<!doctype html>
<html lang="ru" data-bs-theme="dark">

<head>
    <!-- 2024-05-05 00:22:27 -->
        <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>git checkout</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.1.0/css/flag-icons.min.css" integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link href="../../../runebook.css" rel="stylesheet" type="text/css">
    <meta name="x-github" content="https://github.com/runebookdev/runebook">
            <meta name="x-i18n-doc" content="git">
        <script>
        function i18n(element) {
            // NOP
        }
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.js" integrity="sha512-F/dia2jKME12jwqiYDayeD+Rr/8jTWUD2wfbuJB0bzSwenSEnXsn4qQ/wVyXUCix5bmCAj8xJdtFr2OqUtjLAw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.1/rxjs.umd.min.js" integrity="sha512-D9LDs8YUUVa4V9Gl4Zb+xqRAc7RCzooR3+zzebgK2RMu/KU+dh90pbjEEMzPiSyRSGbSp9j1pZnrO4joGa5WEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha512-mhbv5DqBMgrWL+32MmsDOt/OAvqr/cHimk6B8y/bx/xS88MVkYGPiVv2ixKVrkywF2qHplNRUvFsAHUdxZ3Krg==" crossorigin="anonymous"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6424571640879890" crossorigin="anonymous"></script>    <script async src="https://www.googletagmanager.com/gtag/js?id=G-3G5BZ1QEDP"></script>
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'G-3G5BZ1QEDP');
</script>    <script>
(function(c, l, a, r, i, t, y) {
    c[a] = c[a] || function() {
        (c[a].q = c[a].q || []).push(arguments)
    };
    t = l.createElement(r);
    t.async = 1;
    t.src = "https://www.clarity.ms/tag/" + i + "?ref=bwt";
    y = l.getElementsByTagName(r)[0];
    y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "jto2hd94r9");
</script>    <script src="../../../theme.js"></script>
</head>

<body>
    <header class="bg-black">
        <div class="container">
            <div class="row">
                <div class="col">
                    <nav class="navbar navbar-expand-lg navbar-dark">
                        <a class="navbar-brand fw-bold" href="https://runebook.dev/ru">
                            <img alt="Runebook.dev" class="d-inline-block align-top mr-1" src="../../../assets/runebook_logo.webp" width="24" height="24">
                            Runebook.dev
                        </a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/ru#docs">Documentation</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/contributors">Contributors</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://github.com/runebookdev/runebook/issues">GitHub</a>
                                </li>
                            </ul>
                                                                                                <button class="btn btn-success ms-2" id="showPopupButton">
                                        <i class="bi bi-translate"></i>
                                        Show English
                                    </button>
                                                                                        <div class="form-check form-switch ms-3">
                                <label class="text-light">
                                    <input class="form-check-input" type="checkbox" role="switch" id="theme-switch" checked>
                                    <i class="bi bi-moon-stars-fill"></i>
                                </label>
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
    </header>

    <!--sse-->
    <div class="container">
    <div class="row">
        <div class="col">
            <nav aria-label="breadcrumb" class="mt-2">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item">
                        <a href="https://runebook.dev/ru#docs">
                            <span class="fi fi-ru"></span>                            Русский                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <a href="-index-.html">
                            Git                            2.43                        </a>
                    </li>
                                            <li class="breadcrumb-item">
                            <a href="-index-.html#Branching_and_Merging">
                                Branching and Merging                            </a>
                        </li>
                                    </ol>
            </nav>
        </div>
    </div>
    <br>

    <div class="row">
        <div class="col-md-9">
            <main>
                <article>

                    
                    <h1 class="text-body-emphasis" ><span data-i18n="9c80b8fa943d6b0178e0e50b05d44c2d3857279bccc545b91557910c788073e9/10" data-source="git-checkout" onmousemove="i18n(this)">git-checkout</span></h1> <h2 class="text-body-emphasis"  id="_name"><span data-i18n="dcd1d5223f73b3a965c07e3ff5dbee3eedcfedb806686a05b9b3868a2c3d6d50/3a" data-source="Name" onmousemove="i18n(this)">Name</span></h2> <div> <p><span data-i18n="581425ad80e109acbc5683774b0da2d4045ac68839499988313e25a9feca6e87/51" data-source="git-checkout - Switch branches or restore working tree files" onmousemove="i18n(this)">git-checkout &mdash; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &vcy;&iecy;&tcy;&kcy;&icy; &icy;&lcy;&icy; &vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy;&ycy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;</span></p> </div> <h2 class="text-body-emphasis"  id="_synopsis"><span data-i18n="8eb3755381519d7f0479d75446e56e20084834c0460d7ec94926932372ea6c47/0d" data-source="Synopsis" onmousemove="i18n(this)">Synopsis</span></h2> <div> <div> <pre class="hljs language-php-template" data-highlighted="yes"><span class="language-xml">git checkout [-q] [-f] [-m] [<span class="hljs-tag">&lt;<span class="hljs-name">branch</span>&gt;</span>]
git checkout [-q] [-f] [-m] --detach [<span class="hljs-tag">&lt;<span class="hljs-name">branch</span>&gt;</span>]
git checkout [-q] [-f] [-m] [--detach] <span class="hljs-tag">&lt;<span class="hljs-name">commit</span>&gt;</span>
git checkout [-q] [-f] [-m] [[-b|-B|--orphan] <span class="hljs-tag">&lt;<span class="hljs-name">new-branch</span>&gt;</span>] [<span class="hljs-tag">&lt;<span class="hljs-name">start-point</span>&gt;</span>]
git checkout [-f] <span class="hljs-tag">&lt;<span class="hljs-name">tree-ish</span>&gt;</span> [--] <span class="hljs-tag">&lt;<span class="hljs-name">pathspec</span>&gt;</span>&hellip;&ZeroWidthSpace;
git checkout [-f] <span class="hljs-tag">&lt;<span class="hljs-name">tree-ish</span>&gt;</span> --pathspec-from-file=<span class="hljs-tag">&lt;<span class="hljs-name">file</span>&gt;</span> [--pathspec-file-nul]
git checkout [-f|--ours|--theirs|-m|--conflict=<span class="hljs-tag">&lt;<span class="hljs-name">style</span>&gt;</span><span class="language-xml">] [--] <span class="hljs-tag">&lt;<span class="hljs-name">pathspec</span>&gt;</span>&hellip;&ZeroWidthSpace;
git checkout [-f|--ours|--theirs|-m|--conflict=<span class="hljs-tag">&lt;<span class="hljs-name">style</span>&gt;</span><span class="language-xml">] --pathspec-from-file=<span class="hljs-tag">&lt;<span class="hljs-name">file</span>&gt;</span> [--pathspec-file-nul]
git checkout (-p|--patch) [<span class="hljs-tag">&lt;<span class="hljs-name">tree-ish</span>&gt;</span>] [--] [<span class="hljs-tag">&lt;<span class="hljs-name">pathspec</span>&gt;</span>&hellip;&ZeroWidthSpace;]</span></span></span></pre> </div> </div> <h2 class="text-body-emphasis"  id="_description"><span data-i18n="526e0087cc3f254d9f86f6c7d8e23d954c4dfda2b312efc29194ae8a860106ba/d3" data-source="Description" onmousemove="i18n(this)">Description</span></h2> <div> <p><span data-i18n="e4887de6f0ed5cac0d597dd9f1d23c779ecdba62f9a2803bb1fb25edd9e62ad2/8b" data-source="Updates files in the working tree to match the version in the index or the specified tree. If no pathspec was given, &lt;code&gt;git checkout&lt;/code&gt; will also update &lt;code&gt;HEAD&lt;/code&gt; to set the specified branch as the current branch." onmousemove="i18n(this)">&Ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&iecy;&tcy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&ncy;&icy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&lcy;&icy; &vcy;&iecy;&rcy;&scy;&icy;&icy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy; &icy;&lcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ocy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;. &IEcy;&scy;&lcy;&icy; &scy;&pcy;&iecy;&tscy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&yacy; &pcy;&ucy;&tcy;&icy; &ncy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&acy;,  <code>git checkout</code>  &tcy;&acy;&kcy;&zhcy;&iecy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;  <code>HEAD</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ucy;&yucy; &vcy;&iecy;&tcy;&vcy;&softcy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy;.</span></p> <div> <dl> <dt id="Documentation/git-checkout.txt-emgitcheckoutemltbranchgt"> <span data-i18n="fa58ed94d2537f56f80e86242c38d6e5162c1eaf2ace3f74af82b5f3723c594e/68" data-source="&lt;em&gt;git checkout&lt;/em&gt; [&amp;lt;branch&amp;gt;]" onmousemove="i18n(this)">git  &kcy;&acy;&scy;&scy;&acy; [&lt;&fcy;&icy;&lcy;&icy;&acy;&lcy;&gt;]</span></dt> <dd> <p><span data-i18n="ab9ae358084b37a4e3f852d164a62ed02642c57ecb9623641a82dfa3ea3f542b/e8" data-source="To prepare for working on &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt;, switch to it by updating the index and the files in the working tree, and by pointing &lt;code&gt;HEAD&lt;/code&gt; at the branch. Local modifications to the files in the working tree are kept, so that they can be committed to the &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt;." onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&icy;&tcy;&softcy;&scy;&yacy; &kcy; &rcy;&acy;&bcy;&ocy;&tcy;&iecy; &ncy;&acy;&dcy;  <code>&lt;branch&gt;</code> , &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&iecy;&scy;&softcy; &ncy;&acy; &ncy;&iecy;&gcy;&ocy;, &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &icy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &icy; &ucy;&kcy;&acy;&zcy;&acy;&vcy;  <code>HEAD</code>  &ncy;&acy; &vcy;&iecy;&tcy;&kcy;&ucy;. &Lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&yacy;&yucy;&tcy;&scy;&yacy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &icy;&khcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &vcy;  <code>&lt;branch&gt;</code> .</span></p> <p><span data-i18n="b1236e8aa9b85ebd987b7b5f6aff7ae6e5cd121f8b104d2371ed8308a6411187/5a" data-source="If &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt; is not found but there does exist a tracking branch in exactly one remote (call it &lt;code&gt;&amp;lt;remote&amp;gt;&lt;/code&gt;) with a matching name and &lt;code&gt;--no-guess&lt;/code&gt; is not specified, treat as equivalent to" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy;  <code>&lt;branch&gt;</code>  &ncy;&iecy; &ncy;&acy;&jcy;&dcy;&iecy;&ncy;, &ncy;&ocy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &vcy;&iecy;&tcy;&vcy;&softcy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy; &rcy;&ocy;&vcy;&ncy;&ocy; &ncy;&acy; &ocy;&dcy;&ncy;&ocy;&mcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy; (&ncy;&acy;&zcy;&ocy;&vcy;&iecy;&mcy; &iecy;&gcy;&ocy;  <code>&lt;remote&gt;</code> ) &scy; &scy;&ocy;&vcy;&pcy;&acy;&dcy;&acy;&yucy;&shchcy;&icy;&mcy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy; &icy;  <code>--no-guess</code>  &ncy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;, &rcy;&acy;&scy;&scy;&mcy;&acy;&tcy;&rcy;&icy;&vcy;&acy;&jcy;&tcy;&iecy; &iecy;&gcy;&ocy; &kcy;&acy;&kcy; &ecy;&kcy;&vcy;&icy;&vcy;&acy;&lcy;&iecy;&ncy;&tcy;</span></p> <div> <div> <pre class="hljs language-xml">$ git checkout -b <span class="hljs-tag">&lt;<span class="hljs-name">branch</span>&gt;</span> --track <span class="hljs-tag">&lt;<span class="hljs-name">remote</span>&gt;</span>/<span class="hljs-tag">&lt;<span class="hljs-name">branch</span>&gt;</span></pre> </div> </div> <p><span data-i18n="515d25279d765c021f282bb3622e8976e85e2f884b8a5ad89864ba1f57880030/4e" data-source="You could omit &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt;, in which case the command degenerates to &amp;quot;check out the current branch&amp;quot;, which is a glorified no-op with rather expensive side-effects to show only the tracking information, if it exists, for the current branch." onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ocy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy;  <code>&lt;branch&gt;</code>  , &icy; &vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &vcy;&ycy;&rcy;&ocy;&zhcy;&dcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy;  &quot;check out the current branch&quot; , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &scy;&ocy;&bcy;&ocy;&jcy; &pcy;&rcy;&ocy;&scy;&lcy;&acy;&vcy;&lcy;&iecy;&ncy;&ncy;&ucy;&yucy; &pcy;&ucy;&scy;&tcy;&ucy;&yucy; &ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&yucy; &scy; &dcy;&ocy;&vcy;&ocy;&lcy;&softcy;&ncy;&ocy; &dcy;&ocy;&rcy;&ocy;&gcy;&ocy;&scy;&tcy;&ocy;&yacy;&shchcy;&icy;&mcy;&icy; &pcy;&ocy;&bcy;&ocy;&chcy;&ncy;&ycy;&mcy;&icy; &ecy;&fcy;&fcy;&iecy;&kcy;&tcy;&acy;&mcy;&icy;, &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&yucy;&shchcy;&ucy;&yucy; &ocy;&tcy;&ocy;&bcy;&rcy;&acy;&zhcy;&acy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy;, &iecy;&scy;&lcy;&icy; &ocy;&ncy;&acy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;, &dcy;&lcy;&yacy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt-emgitcheckoutem-b-Bltnew-branchgtltstart-pointgt"> <span data-i18n="03a275f04bccb157caf3688194dff5d1d5d7fb62857c8ca317239dcc3994b6f1/de" data-source="&lt;em&gt;git checkout&lt;/em&gt; -b|-B &amp;lt;new-branch&amp;gt; [&amp;lt;start-point&amp;gt;]" onmousemove="i18n(this)">git  checkout -b|-B &lt;&ncy;&ocy;&vcy;&acy;&yacy;-&vcy;&iecy;&tcy;&vcy;&softcy;&gt; [&lt;&ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&acy;&yacy; &tcy;&ocy;&chcy;&kcy;&acy;&gt;]</span></dt> <dd> <p><span data-i18n="1328e7af5fb010db1f3a311d936306265c1deaca39b3f815b36bfe4dc227fdd1/ff" data-source="Specifying &lt;code&gt;-b&lt;/code&gt; causes a new branch to be created as if &lt;a href=&quot;git-branch&quot;&gt;git-branch[1]&lt;/a&gt; were called and then checked out. In this case you can use the &lt;code&gt;--track&lt;/code&gt; or &lt;code&gt;--no-track&lt;/code&gt; options, which will be passed to &lt;code&gt;git branch&lt;/code&gt;. As a convenience, &lt;code&gt;--track&lt;/code&gt; without &lt;code&gt;-b&lt;/code&gt; implies branch creation; see the description of &lt;code&gt;--track&lt;/code&gt; below." onmousemove="i18n(this)">&Ucy;&kcy;&acy;&zcy;&acy;&ncy;&icy;&iecy;  <code>-b</code>  &pcy;&rcy;&icy;&vcy;&ocy;&dcy;&icy;&tcy; &kcy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&yucy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;, &kcy;&acy;&kcy; &iecy;&scy;&lcy;&icy; &bcy;&ycy;  <a href="git-branch.html">git-branch[1]</a>  &bcy;&ycy;&lcy; &vcy;&ycy;&zcy;&vcy;&acy;&ncy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;. &Vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &ocy;&pcy;&tscy;&icy;&icy;  <code>--track</code>  &icy;&lcy;&icy;  <code>--no-track</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &bcy;&ucy;&dcy;&ucy;&tcy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&ncy;&ycy;  <code>git branch</code> . &Dcy;&lcy;&yacy; &ucy;&dcy;&ocy;&bcy;&scy;&tcy;&vcy;&acy;  <code>--track</code>  &bcy;&iecy;&zcy;  <code>-b</code>  &pcy;&ocy;&dcy;&rcy;&acy;&zcy;&ucy;&mcy;&iecy;&vcy;&acy;&iecy;&tcy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&iecy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy;; &scy;&mcy;. &ocy;&pcy;&icy;&scy;&acy;&ncy;&icy;&iecy;  <code>--track</code>  &ncy;&icy;&zhcy;&iecy;.</span></p> <p><span data-i18n="93212fa5f58aa29470844e2d8e01d9baaf3a38f5e81dea6016e8d9a0738eb9bc/0d" data-source="If &lt;code&gt;-B&lt;/code&gt; is given, &lt;code&gt;&amp;lt;new-branch&amp;gt;&lt;/code&gt; is created if it doesn&amp;rsquo;t exist; otherwise, it is reset. This is the transactional equivalent of" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &zcy;&acy;&dcy;&acy;&ncy;  <code>-B</code> , &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy;&scy;&yacy;  <code>&lt;new-branch&gt;</code> , &iecy;&scy;&lcy;&icy; &ocy;&ncy; &ncy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;; &vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &ocy;&ncy; &scy;&bcy;&rcy;&acy;&scy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;. &Ecy;&tcy;&ocy; &tcy;&rcy;&acy;&ncy;&zcy;&acy;&kcy;&tscy;&icy;&ocy;&ncy;&ncy;&ycy;&jcy; &ecy;&kcy;&vcy;&icy;&vcy;&acy;&lcy;&iecy;&ncy;&tcy;</span></p> <div> <div> <pre class="hljs language-xml">$ git branch -f <span class="hljs-tag">&lt;<span class="hljs-name">branch</span>&gt;</span> [<span class="hljs-tag">&lt;<span class="hljs-name">start-point</span>&gt;</span>]
$ git checkout <span class="hljs-tag">&lt;<span class="hljs-name">branch</span>&gt;</span></pre> </div> </div> <p><span data-i18n="5afca114bea19476b272809cbdb56045fe69b4e3278dd68d0f393ea0eb0e02f9/b6" data-source="that is to say, the branch is not reset/created unless &amp;quot;git checkout&amp;quot; is successful." onmousemove="i18n(this)">&tcy;&ocy; &iecy;&scy;&tcy;&softcy; &vcy;&iecy;&tcy;&vcy;&softcy; &ncy;&iecy; &scy;&bcy;&rcy;&acy;&scy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;/&scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy;&scy;&yacy;, &pcy;&ocy;&kcy;&acy;  &quot;git checkout&quot;  &ncy;&iecy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&icy;&tcy;&scy;&yacy; &ucy;&scy;&pcy;&iecy;&shcy;&ncy;&ocy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt-emgitcheckoutem--detachltbranchgt"> <span data-i18n="a88dd920ba693b4938c2112f3a685268be6d203d281b5b17e7d759f679d32cd2/52" data-source="&lt;em&gt;git checkout&lt;/em&gt; --detach [&amp;lt;branch&amp;gt;]" onmousemove="i18n(this)">git  &ocy;&fcy;&ocy;&rcy;&mcy;&lcy;&iecy;&ncy;&icy;&iecy; &zcy;&acy;&kcy;&acy;&zcy;&acy; --detach [&lt;&vcy;&iecy;&tcy;&vcy;&softcy;&gt;]</span></dt> <dt id="Documentation/git-checkout.txt-emgitcheckoutem--detachltcommitgt"> <span data-i18n="c4e6bc362172bd566f4ea4465af11df2f0e918e522c45ffa056769484c2c751a/19" data-source="&lt;em&gt;git checkout&lt;/em&gt; [--detach] &amp;lt;commit&amp;gt;" onmousemove="i18n(this)">git  &ocy;&fcy;&ocy;&rcy;&mcy;&lcy;&iecy;&ncy;&icy;&iecy; &zcy;&acy;&kcy;&acy;&zcy;&acy; [--detach] &lt;&fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yacy;&gt;</span></dt> <dd> <p><span data-i18n="87895a5a0f83adab2f60ca9b89320684265c3862d4d65b8398944a11c38df742/35" data-source="Prepare to work on top of &lt;code&gt;&amp;lt;commit&amp;gt;&lt;/code&gt;, by detaching &lt;code&gt;HEAD&lt;/code&gt; at it (see &amp;quot;DETACHED HEAD&amp;quot; section), and updating the index and the files in the working tree. Local modifications to the files in the working tree are kept, so that the resulting working tree will be the state recorded in the commit plus the local modifications." onmousemove="i18n(this)">&Pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&softcy;&tcy;&iecy;&scy;&softcy; &kcy; &rcy;&acy;&bcy;&ocy;&tcy;&iecy; &pcy;&ocy;&vcy;&iecy;&rcy;&khcy;  <code>&lt;commit&gt;</code> , &ocy;&tcy;&scy;&ocy;&iecy;&dcy;&icy;&ncy;&icy;&vcy; &ocy;&tcy; &ncy;&iecy;&gcy;&ocy;  <code>HEAD</code>  (&scy;&mcy;. &rcy;&acy;&zcy;&dcy;&iecy;&lcy;  &quot;DETACHED HEAD&quot; ) &icy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &icy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;. &Lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&yacy;&yucy;&tcy;&scy;&yacy;, &tcy;&acy;&kcy; &chcy;&tcy;&ocy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&icy;&rcy;&ucy;&yucy;&shchcy;&iecy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&mcy;&iecy;&tcy;&softcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;, &zcy;&acy;&pcy;&icy;&scy;&acy;&ncy;&ncy;&ocy;&iecy; &vcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&iecy;, &pcy;&lcy;&yucy;&scy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;.</span></p> <p><span data-i18n="6cae5e2b79457dba0244c2ff88335bef5b94c288163dd3746c328c2759cbfac8/16" data-source="When the &lt;code&gt;&amp;lt;commit&amp;gt;&lt;/code&gt; argument is a branch name, the &lt;code&gt;--detach&lt;/code&gt; option can be used to detach &lt;code&gt;HEAD&lt;/code&gt; at the tip of the branch (&lt;code&gt;git checkout
&amp;lt;branch&amp;gt;&lt;/code&gt; would check out that branch without detaching &lt;code&gt;HEAD&lt;/code&gt;)." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;  <code>&lt;commit&gt;</code>  &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy; &vcy;&iecy;&tcy;&kcy;&icy;, &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;  <code>--detach</code>  &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &dcy;&lcy;&yacy; &ocy;&tcy;&scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&yacy;  <code>HEAD</code>  &ncy;&acy; &kcy;&ocy;&ncy;&chcy;&icy;&kcy;&iecy; &vcy;&iecy;&tcy;&kcy;&icy; ( <code>git checkout
&lt;branch&gt;</code>  &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&tcy; &ecy;&tcy;&ucy; &vcy;&iecy;&tcy;&vcy;&softcy;, &ncy;&iecy; &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&acy;&yacy;  <code>HEAD</code> ).</span></p> <p><span data-i18n="98c67d5db8cd93cddc0bb40907d5139ff83e350c99f56d1fbff91385f531a590/2b" data-source="Omitting &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt; detaches &lt;code&gt;HEAD&lt;/code&gt; at the tip of the current branch." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy;  <code>&lt;branch&gt;</code> ,  <code>HEAD</code>  &ocy;&tcy;&scy;&ocy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&scy;&yacy; &ncy;&acy; &kcy;&ocy;&ncy;&chcy;&icy;&kcy;&iecy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &vcy;&iecy;&tcy;&vcy;&icy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt-emgitcheckoutem-f--ours--theirs-m--conflictltstylegtlttree-ishgt--ltpathspecgt82308203"> <span data-i18n="c1e19caf2cdabbac61dcf9bf150663d0a92621ba5bcfcc73ebdf8ff3b84f07e9/11" data-source="&lt;em&gt;git checkout&lt;/em&gt; [-f|--ours|--theirs|-m|--conflict=&amp;lt;style&amp;gt;] [&amp;lt;tree-ish&amp;gt;] [--] &amp;lt;pathspec&amp;gt;&amp;hellip;" onmousemove="i18n(this)">git  checkout [-f|--&ncy;&acy;&shcy;&icy;|--&icy;&khcy;|-m|--conflict=&lt;&scy;&tcy;&icy;&lcy;&softcy;&gt;] [&lt;&dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&gt;] [--] &lt;pathspec&gt;&hellip;</span></dt> <dt id="Documentation/git-checkout.txt-emgitcheckoutem-f--ours--theirs-m--conflictltstylegtlttree-ishgt--pathspec-from-fileltfilegt--pathspec-file-nul"> <span data-i18n="4d0b7b10de6fe7fcd6982b829bac91cc5d2f37400991d8e1983f3fd37efe0a99/15" data-source="&lt;em&gt;git checkout&lt;/em&gt; [-f|--ours|--theirs|-m|--conflict=&amp;lt;style&amp;gt;] [&amp;lt;tree-ish&amp;gt;] --pathspec-from-file=&amp;lt;file&amp;gt; [--pathspec-file-nul]" onmousemove="i18n(this)">git  checkout [-f|--&ncy;&acy;&shcy;&icy;|--&icy;&khcy;|-m|--conflict=&lt;&scy;&tcy;&icy;&lcy;&softcy;&gt;] [&lt;&dcy;&iecy;&rcy;&iecy;&vcy;&ocy;-&icy;&shcy;&gt;] --pathspec-from-file=&lt;file&gt; [--pathspec-file- &ncy;&ocy;&lcy;&softcy;]</span></dt> <dd> <p><span data-i18n="5e2dd2303af1593d2a1f784ac4bfbe9cb43eafd15481fe526912e51d74399013/af" data-source="Overwrite the contents of the files that match the pathspec. When the &lt;code&gt;&amp;lt;tree-ish&amp;gt;&lt;/code&gt; (most often a commit) is not given, overwrite working tree with the contents in the index. When the &lt;code&gt;&amp;lt;tree-ish&amp;gt;&lt;/code&gt; is given, overwrite both the index and the working tree with the contents at the &lt;code&gt;&amp;lt;tree-ish&amp;gt;&lt;/code&gt;." onmousemove="i18n(this)">&Pcy;&iecy;&rcy;&iecy;&zcy;&acy;&pcy;&icy;&shcy;&icy;&tcy;&iecy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&khcy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ocy;&mcy;&ucy; &pcy;&ucy;&tcy;&icy;. &IEcy;&scy;&lcy;&icy;  <code>&lt;tree-ish&gt;</code>  (&chcy;&acy;&shchcy;&iecy; &vcy;&scy;&iecy;&gcy;&ocy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yacy;) &ncy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;, &pcy;&iecy;&rcy;&iecy;&zcy;&acy;&pcy;&icy;&shcy;&icy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ycy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;. &Kcy;&ocy;&gcy;&dcy;&acy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;  <code>&lt;tree-ish&gt;</code> , &pcy;&iecy;&rcy;&iecy;&zcy;&acy;&pcy;&icy;&shcy;&icy;&tcy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ycy;&mcy;  <code>&lt;tree-ish&gt;</code> .</span></p> <p><span data-i18n="74f4ccb92b52a00ad90210a118cb1127239055d4211c58053acf0aafbf8a5aa5/8f" data-source="The index may contain unmerged entries because of a previous failed merge. By default, if you try to check out such an entry from the index, the checkout operation will fail and nothing will be checked out. Using &lt;code&gt;-f&lt;/code&gt; will ignore these unmerged entries. The contents from a specific side of the merge can be checked out of the index by using &lt;code&gt;--ours&lt;/code&gt; or &lt;code&gt;--theirs&lt;/code&gt;. With &lt;code&gt;-m&lt;/code&gt;, changes made to the working tree file can be discarded to re-create the original conflicted merge result." onmousemove="i18n(this)">&Icy;&ncy;&dcy;&iecy;&kcy;&scy; &mcy;&ocy;&zhcy;&iecy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &ncy;&iecy;&scy;&lcy;&icy;&tcy;&ycy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy; &icy;&zcy;-&zcy;&acy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&iecy;&gcy;&ocy; &ncy;&iecy;&ucy;&dcy;&acy;&chcy;&ncy;&ocy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;. &Pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&ocy;&pcy;&ycy;&tcy;&acy;&iecy;&tcy;&iecy;&scy;&softcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&softcy; &tcy;&acy;&kcy;&ucy;&yucy; &ZeroWidthSpace;&ZeroWidthSpace;&zcy;&acy;&pcy;&icy;&scy;&softcy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;, &ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&yacy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&yacy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&icy;&tcy;&scy;&yacy; &ncy;&iecy;&ucy;&dcy;&acy;&chcy;&ncy;&ocy;, &icy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &ncy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ocy;. &Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;  <code>-f</code>  &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&icy; &ncy;&iecy;&scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy;. &Scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&iecy;&ncy;&ncy;&ocy;&jcy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ycy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&softcy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>--ours</code>  &icy;&lcy;&icy;  <code>--theirs</code>  . &Scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>-m</code>  &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;, &vcy;&ncy;&iecy;&scy;&iecy;&ncy;&ncy;&ycy;&iecy; &vcy; &fcy;&acy;&jcy;&lcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &mcy;&ocy;&zhcy;&ncy;&ocy; &ocy;&tcy;&mcy;&iecy;&ncy;&icy;&tcy;&softcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&ocy;&scy;&scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ycy;&jcy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ncy;&ycy;&jcy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt-emgitcheckoutem-p--patchlttree-ishgt--ltpathspecgt82308203"> <span data-i18n="3c2fc900097d6a4543bd5630427c341c95c6eccde39fe68a1c364a4257cf5fb0/9e" data-source="&lt;em&gt;git checkout&lt;/em&gt; (-p|--patch) [&amp;lt;tree-ish&amp;gt;] [--] [&amp;lt;pathspec&amp;gt;&amp;hellip;&amp;ZeroWidthSpace;]" onmousemove="i18n(this)">git  checkout (-p|--patch) [&lt;tree-ish&gt;] [--] [&lt;pathspec&gt;&hellip;&ZeroWidthSpace;]</span></dt> <dd> <p><span data-i18n="d89b33f2c96ed0d9e721865d60b36ec78ecb81663e7ea278e452f6a3aba99edc/cd" data-source="This is similar to the previous mode, but lets you use the interactive interface to show the &amp;quot;diff&amp;quot; output and choose which hunks to use in the result. See below for the description of &lt;code&gt;--patch&lt;/code&gt; option." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &pcy;&ocy;&khcy;&ocy;&zhcy;&iecy; &ncy;&acy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&icy;&jcy; &rcy;&iecy;&zhcy;&icy;&mcy;, &ncy;&ocy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &vcy;&acy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &icy;&ncy;&tcy;&iecy;&rcy;&acy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy;&jcy; &icy;&ncy;&tcy;&iecy;&rcy;&fcy;&iecy;&jcy;&scy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &vcy;&ycy;&khcy;&ocy;&dcy;&ncy;&ycy;&iecy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy;  &quot;diff&quot;  &icy; &vcy;&ycy;&bcy;&rcy;&acy;&tcy;&softcy;, &kcy;&acy;&kcy;&icy;&iecy; &fcy;&rcy;&acy;&gcy;&mcy;&iecy;&ncy;&tcy;&ycy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &vcy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&iecy;. &Ncy;&icy;&zhcy;&iecy; &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&ncy;&ocy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&icy;&iecy; &ocy;&pcy;&tscy;&icy;&icy;  <code>--patch</code> .</span></p> </dd> </dl> </div> </div> <h2 class="text-body-emphasis"  id="_options"><span data-i18n="d0db8b5e364b6989e4b8f38a2b3846b87d99a51c1592ebf35d21cc66405a8e39/b6" data-source="Options" onmousemove="i18n(this)">Options</span></h2> <div> <div> <dl> <dt id="Documentation/git-checkout.txt--q"><span data-i18n="5ce681666a15a41274346f65b8bcbf56f8e8170ac00706a44a09ee4d786a8609/cd" data-source="-q" onmousemove="i18n(this)">-q</span></dt> <dt id="Documentation/git-checkout.txt---quiet"><span data-i18n="b00818cdc507640687732769ee1cb501db377927ee76d03df23978bd0d706888/e2" data-source="--quiet" onmousemove="i18n(this)">--quiet</span></dt> <dd> <p><span data-i18n="d413d5cead88768e48ffaf7616182de1407177487333584c59b3d3c98cadc8e7/e2" data-source="Quiet, suppress feedback messages." onmousemove="i18n(this)">&Tcy;&icy;&khcy;&ocy;, &pcy;&ocy;&dcy;&acy;&vcy;&lcy;&yacy;&jcy;&tcy;&iecy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&yacy; &ocy;&bcy;&rcy;&acy;&tcy;&ncy;&ocy;&jcy; &scy;&vcy;&yacy;&zcy;&icy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt---progress"><span data-i18n="c4d85ead394fc39f65f473a99058ad8fe951b5cd8d8dacc9e82d90e36b6430ea/a2" data-source="--progress" onmousemove="i18n(this)">--progress</span></dt> <dt id="Documentation/git-checkout.txt---no-progress"><span data-i18n="22f4f0ddc705adf0de87e662c11a1d9f91a5693bfd2b50df9fec2f4ba289b775/63" data-source="--no-progress" onmousemove="i18n(this)">--no-progress</span></dt> <dd> <p><span data-i18n="e45586208d5dd0110c830f166300dfa135cf6e1c4f71bb6b0064b377806a1b49/29" data-source="Progress status is reported on the standard error stream by default when it is attached to a terminal, unless &lt;code&gt;--quiet&lt;/code&gt; is specified. This flag enables progress reporting even if not attached to a terminal, regardless of &lt;code&gt;--quiet&lt;/code&gt;." onmousemove="i18n(this)">&Scy;&tcy;&acy;&tcy;&ucy;&scy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; &scy;&tcy;&acy;&ncy;&dcy;&acy;&rcy;&tcy;&ncy;&ocy;&mcy; &pcy;&ocy;&tcy;&ocy;&kcy;&iecy; &ocy;&shcy;&icy;&bcy;&ocy;&kcy;, &kcy;&ocy;&gcy;&dcy;&acy; &ocy;&ncy; &pcy;&ocy;&dcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy; &kcy; &tcy;&iecy;&rcy;&mcy;&icy;&ncy;&acy;&lcy;&ucy;, &iecy;&scy;&lcy;&icy; &ncy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;  <code>--quiet</code> . &Ecy;&tcy;&ocy;&tcy; &fcy;&lcy;&acy;&gcy; &vcy;&kcy;&lcy;&yucy;&chcy;&acy;&iecy;&tcy; &ocy;&tcy;&chcy;&iecy;&tcy; &ocy; &khcy;&ocy;&dcy;&iecy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&yacy;, &dcy;&acy;&zhcy;&iecy; &iecy;&scy;&lcy;&icy; &ocy;&ncy; &ncy;&iecy; &pcy;&ocy;&dcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy; &kcy; &tcy;&iecy;&rcy;&mcy;&icy;&ncy;&acy;&lcy;&ucy;, &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy; &ocy;&tcy;  <code>--quiet</code> .</span></p> </dd> <dt id="Documentation/git-checkout.txt--f"><span data-i18n="0e6503c1ece40e4ea7668463248ea2716eb37643f2c2c605f8bcee4d195a1705/83" data-source="-f" onmousemove="i18n(this)">-f</span></dt> <dt id="Documentation/git-checkout.txt---force"><span data-i18n="be262a109369ff4174b4b7a7aa917a83ca99dc94093be7d497384bb8c0f9cee6/ef" data-source="--force" onmousemove="i18n(this)">--force</span></dt> <dd> <p><span data-i18n="24b68f4bc09e78bb929b26e246edc2239e81ed0e7d28e23d54ee11b6553fe0fb/0a" data-source="When switching branches, proceed even if the index or the working tree differs from &lt;code&gt;HEAD&lt;/code&gt;, and even if there are untracked files in the way. This is used to throw away local changes and any untracked files or directories that are in the way." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&icy; &vcy;&iecy;&tcy;&ocy;&kcy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&ucy;&jcy;&tcy;&iecy;, &dcy;&acy;&zhcy;&iecy; &iecy;&scy;&lcy;&icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &icy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ocy;&tcy;&lcy;&icy;&chcy;&acy;&yucy;&tcy;&scy;&yacy; &ocy;&tcy;  <code>HEAD</code> , &icy; &dcy;&acy;&zhcy;&iecy; &iecy;&scy;&lcy;&icy; &ncy;&acy; &pcy;&ucy;&tcy;&icy; &iecy;&scy;&tcy;&softcy; &ncy;&iecy;&ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&mcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;. &Ecy;&tcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &dcy;&lcy;&yacy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yacy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&khcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy; &icy; &lcy;&yucy;&bcy;&ycy;&khcy; &ncy;&iecy;&ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&mcy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &icy;&lcy;&icy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&ocy;&vcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &mcy;&iecy;&shcy;&acy;&yucy;&tcy;.</span></p> <p><span data-i18n="2ead708959d4d10b2ba9f5df55489d656d5b3c1bb0234788bd7cec0593f30b57/83" data-source="When checking out paths from the index, do not fail upon unmerged entries; instead, unmerged entries are ignored." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&iecy; &pcy;&ucy;&tcy;&iecy;&jcy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &ncy;&iecy; &dcy;&ocy;&pcy;&ucy;&scy;&kcy;&acy;&jcy;&tcy;&iecy; &scy;&bcy;&ocy;&iecy;&vcy; &pcy;&rcy;&icy; &ncy;&iecy;&scy;&lcy;&icy;&tcy;&ycy;&khcy; &zcy;&acy;&pcy;&icy;&scy;&yacy;&khcy;; &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &ncy;&iecy;&scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy; &icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ucy;&yucy;&tcy;&scy;&yacy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt---ours"><span data-i18n="f095625b4b5843255d2d62746f988ab17ba239db35dcc805e381f9c06c485e02/ec" data-source="--ours" onmousemove="i18n(this)">--ours</span></dt> <dt id="Documentation/git-checkout.txt---theirs"><span data-i18n="40c0d0b85d63db14b31ceecbc1352ef98653b2455a324cec67a63f45b0dd8396/e4" data-source="--theirs" onmousemove="i18n(this)">--theirs</span></dt> <dd> <p><span data-i18n="924e8e911313782abefd819938dc996500c41c37d2774fe43a5683c8b217cef9/92" data-source="When checking out paths from the index, check out stage #2 (&lt;code&gt;ours&lt;/code&gt;) or #3 (&lt;code&gt;theirs&lt;/code&gt;) for unmerged paths." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&iecy; &pcy;&ucy;&tcy;&iecy;&jcy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&softcy;&tcy;&iecy; &ecy;&tcy;&acy;&pcy; &numero; 2 (  <code>ours</code>  ) &icy;&lcy;&icy; &numero; 3 (  <code>theirs</code>  ) &ncy;&acy; &ncy;&acy;&lcy;&icy;&chcy;&icy;&iecy; &ncy;&iecy;&scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&khcy; &pcy;&ucy;&tcy;&iecy;&jcy;.</span></p> <p><span data-i18n="239d5e3748cfa757384c2c0c78444a39d2ad3a16cfd5afb8202e30e74fb8cf9b/f7" data-source="Note that during &lt;code&gt;git rebase&lt;/code&gt; and &lt;code&gt;git pull --rebase&lt;/code&gt;, &lt;code&gt;ours&lt;/code&gt; and &lt;code&gt;theirs&lt;/code&gt; may appear swapped; &lt;code&gt;--ours&lt;/code&gt; gives the version from the branch the changes are rebased onto, while &lt;code&gt;--theirs&lt;/code&gt; gives the version from the branch that holds your work that is being rebased." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &vcy;&ocy; &vcy;&rcy;&iecy;&mcy;&yacy;  <code>git rebase</code>  &icy;  <code>git pull --rebase</code> <code>ours</code>  &icy;  <code>theirs</code>  &mcy;&ocy;&gcy;&ucy;&tcy; &ocy;&tcy;&ocy;&bcy;&rcy;&acy;&zhcy;&acy;&tcy;&softcy;&scy;&yacy; &pcy;&iecy;&rcy;&iecy;&pcy;&ucy;&tcy;&acy;&ncy;&ncy;&ycy;&mcy;&icy;;  <code>--ours</code>  &pcy;&rcy;&iecy;&dcy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &vcy;&iecy;&rcy;&scy;&icy;&yucy; &icy;&zcy; &vcy;&iecy;&tcy;&kcy;&icy;, &ncy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &pcy;&iecy;&rcy;&iecy;&bcy;&acy;&zcy;&icy;&rcy;&ucy;&yucy;&tcy;&scy;&yacy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;, &acy;  <code>--theirs</code>  &pcy;&rcy;&iecy;&dcy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &vcy;&iecy;&rcy;&scy;&icy;&yucy; &icy;&zcy; &vcy;&iecy;&tcy;&kcy;&icy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&jcy; &khcy;&rcy;&acy;&ncy;&icy;&tcy;&scy;&yacy; &vcy;&acy;&shcy;&acy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &pcy;&iecy;&rcy;&iecy;&bcy;&acy;&zcy;&icy;&rcy;&ucy;&iecy;&tcy;&scy;&yacy;.</span></p> <p><span data-i18n="1a1e8d71826af3d6c00c4db751f71d2269fe54188bcf02a5f44b737785ec819e/9a" data-source="This is because &lt;code&gt;rebase&lt;/code&gt; is used in a workflow that treats the history at the remote as the shared canonical one, and treats the work done on the branch you are rebasing as the third-party work to be integrated, and you are temporarily assuming the role of the keeper of the canonical history during the rebase. As the keeper of the canonical history, you need to view the history from the remote as &lt;code&gt;ours&lt;/code&gt; (i.e. &amp;quot;our shared canonical history&amp;quot;), while what you did on your side branch as &lt;code&gt;theirs&lt;/code&gt; (i.e. &amp;quot;one contributor&amp;rsquo;s work on top of it&amp;quot;)." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ocy; &scy; &tcy;&iecy;&mcy;, &chcy;&tcy;&ocy;  <code>rebase</code>  &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&iecy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &rcy;&acy;&scy;&scy;&mcy;&acy;&tcy;&rcy;&icy;&vcy;&acy;&iecy;&tcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yucy; &ncy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy; &kcy;&acy;&kcy; &ocy;&bcy;&shchcy;&ucy;&yucy; &kcy;&acy;&ncy;&ocy;&ncy;&icy;&chcy;&iecy;&scy;&kcy;&ucy;&yucy;, &acy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy;, &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&ncy;&ucy;&yucy; &vcy; &vcy;&iecy;&tcy;&kcy;&iecy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &vcy;&ycy; &pcy;&iecy;&rcy;&iecy;&bcy;&acy;&zcy;&icy;&rcy;&ucy;&iecy;&tcy;&iecy;, &rcy;&acy;&scy;&scy;&mcy;&acy;&tcy;&rcy;&icy;&vcy;&acy;&iecy;&tcy; &kcy;&acy;&kcy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&yucy;&yucy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy;, &pcy;&ocy;&dcy;&lcy;&iecy;&zhcy;&acy;&shchcy;&ucy;&yucy; &icy;&ncy;&tcy;&iecy;&gcy;&rcy;&acy;&tscy;&icy;&icy;, &icy; &vcy;&ycy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy; &pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&iecy;&tcy;&iecy; &ncy;&acy; &scy;&iecy;&bcy;&yacy; &ecy;&tcy;&ucy; &rcy;&ocy;&lcy;&softcy;. &khcy;&rcy;&acy;&ncy;&icy;&tcy;&iecy;&lcy;&yacy; &kcy;&acy;&ncy;&ocy;&ncy;&icy;&chcy;&iecy;&scy;&kcy;&ocy;&jcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy; &vcy;&ocy; &vcy;&rcy;&iecy;&mcy;&yacy; &pcy;&iecy;&rcy;&iecy;&bcy;&acy;&zcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;. &Kcy;&acy;&kcy; &khcy;&rcy;&acy;&ncy;&icy;&tcy;&iecy;&lcy;&yucy; &kcy;&acy;&ncy;&ocy;&ncy;&icy;&chcy;&iecy;&scy;&kcy;&ocy;&jcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy;, &vcy;&acy;&mcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &pcy;&rcy;&ocy;&scy;&mcy;&acy;&tcy;&rcy;&icy;&vcy;&acy;&tcy;&softcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yucy; &scy; &pcy;&ucy;&lcy;&softcy;&tcy;&acy; &kcy;&acy;&kcy;  <code>ours</code>  (&tcy;.&iecy;.  &quot;our shared canonical history&quot; ), &acy; &tcy;&ocy;, &chcy;&tcy;&ocy; &vcy;&ycy; &dcy;&iecy;&lcy;&acy;&lcy;&icy; &ncy;&acy; &bcy;&ocy;&kcy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy;, &kcy;&acy;&kcy;  <code>theirs</code>  (&tcy;.&iecy;.  &quot;one contributor&rsquo;s work on top of it&quot; ).</span></p> </dd> <dt id="Documentation/git-checkout.txt--bltnew-branchgt"><span data-i18n="a17eec625277c75cd68f7901800f745852b1a10ac7e750c393d625916c07e2ac/86" data-source="-b &amp;lt;new-branch&amp;gt;" onmousemove="i18n(this)">-b &lt;new-branch&gt;</span></dt> <dd> <p><span data-i18n="13546441c049c81e8b2dd2e18645d2f2b97f17377f0e6e1ac721322c78f225ca/06" data-source="Create a new branch named &lt;code&gt;&amp;lt;new-branch&amp;gt;&lt;/code&gt;, start it at &lt;code&gt;&amp;lt;start-point&amp;gt;&lt;/code&gt;, and check the resulting branch out; see &lt;a href=&quot;git-branch&quot;&gt;git-branch[1]&lt;/a&gt; for details." onmousemove="i18n(this)">&Scy;&ocy;&zcy;&dcy;&acy;&jcy;&tcy;&iecy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>&lt;new-branch&gt;</code> , &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&iecy; &iecy;&iecy; &scy;  <code>&lt;start-point&gt;</code>  &icy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&softcy;&tcy;&iecy; &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&ncy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;; &pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &vcy;  <a href="git-branch.html">git-branch[1]</a> .</span></p> </dd> <dt id="Documentation/git-checkout.txt--Bltnew-branchgt"><span data-i18n="abfe1fcacc3b3436bcd22008521f92cdd9cc0a207f768008c20eac7e35570946/64" data-source="-B &amp;lt;new-branch&amp;gt;" onmousemove="i18n(this)">-B &lt;new-branch&gt;</span></dt> <dd> <p><span data-i18n="d58e41e765de3bfb56a1f0390aa5de3ccbea5008b8a3002181911208ae7756d2/31" data-source="Creates the branch &lt;code&gt;&amp;lt;new-branch&amp;gt;&lt;/code&gt;, start it at &lt;code&gt;&amp;lt;start-point&amp;gt;&lt;/code&gt;; if it already exists, then reset it to &lt;code&gt;&amp;lt;start-point&amp;gt;&lt;/code&gt;. And then check the resulting branch out. This is equivalent to running &amp;quot;git branch&amp;quot; with &amp;quot;-f&amp;quot; followed by &amp;quot;git checkout&amp;quot; of that branch; see &lt;a href=&quot;git-branch&quot;&gt;git-branch[1]&lt;/a&gt; for details." onmousemove="i18n(this)">&Scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy; &vcy;&iecy;&tcy;&kcy;&ucy;  <code>&lt;new-branch&gt;</code> , &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&tcy; &iecy;&iecy; &pcy;&ocy; &acy;&dcy;&rcy;&iecy;&scy;&ucy;  <code>&lt;start-point&gt;</code> ; &iecy;&scy;&lcy;&icy; &ocy;&ncy; &ucy;&zhcy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;, &tcy;&ocy; &scy;&bcy;&rcy;&ocy;&scy;&softcy;&tcy;&iecy; &iecy;&gcy;&ocy; &ncy;&acy;  <code>&lt;start-point&gt;</code> . &Acy; &zcy;&acy;&tcy;&iecy;&mcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&softcy;&tcy;&iecy; &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&ncy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;. &Ecy;&tcy;&ocy; &ecy;&kcy;&vcy;&icy;&vcy;&acy;&lcy;&iecy;&ncy;&tcy;&ncy;&ocy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&ucy;  &quot;git branch&quot;  &scy;  &quot;-f&quot; , &zcy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy;  &quot;git checkout&quot;  &ecy;&tcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;; &pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &vcy;  <a href="git-branch.html">git-branch[1]</a> .</span></p> </dd> <dt id="Documentation/git-checkout.txt--t"><span data-i18n="7cd2e81795b97f4d593d0150f2882d884095719e4f612093a853d72747ebdba0/03" data-source="-t" onmousemove="i18n(this)">-t</span></dt> <dt id="Documentation/git-checkout.txt---trackdirectinherit"><span data-i18n="de4facf1ea20ef84bcfe14c0cae3f4b6339f91ba702f37783aa1602598161d20/99" data-source="--track[=(direct|inherit)]" onmousemove="i18n(this)">--track[=(direct|inherit)]</span></dt> <dd> <p><span data-i18n="41bb91813557fc94e8f2dd5792884a995cd88a552389c2d90e38d768aac9f611/07" data-source="When creating a new branch, set up &amp;quot;upstream&amp;quot; configuration. See &amp;quot;--track&amp;quot; in &lt;a href=&quot;git-branch&quot;&gt;git-branch[1]&lt;/a&gt; for details." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&icy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&jcy;&tcy;&iecy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&yucy;  &quot;upstream&quot; . &Pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &vcy;  &quot;--track&quot;  &icy;  <a href="git-branch.html">git-branch[1]</a> .</span></p> <p><span data-i18n="fa715f61c7154c29842e8b22d411b2c2c7e64449b41b335506aa2e7e30495fd6/9f" data-source="If no &lt;code&gt;-b&lt;/code&gt; option is given, the name of the new branch will be derived from the remote-tracking branch, by looking at the local part of the refspec configured for the corresponding remote, and then stripping the initial part up to the &amp;quot;*&amp;quot;. This would tell us to use &lt;code&gt;hack&lt;/code&gt; as the local branch when branching off of &lt;code&gt;origin/hack&lt;/code&gt; (or &lt;code&gt;remotes/origin/hack&lt;/code&gt;, or even &lt;code&gt;refs/remotes/origin/hack&lt;/code&gt;). If the given name has no slash, or the above guessing results in an empty name, the guessing is aborted. You can explicitly give a name with &lt;code&gt;-b&lt;/code&gt; in such a case." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &ocy;&pcy;&tscy;&icy;&yacy;  <code>-b</code>  &ncy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&acy;, &icy;&mcy;&yacy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy; &bcy;&ucy;&dcy;&iecy;&tcy; &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&ocy; &icy;&zcy; &vcy;&iecy;&tcy;&kcy;&icy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy; &pcy;&ucy;&tcy;&iecy;&mcy; &pcy;&rcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&acy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ocy;&jcy; &chcy;&acy;&scy;&tcy;&icy; &scy;&pcy;&iecy;&tscy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&icy; &scy;&scy;&ycy;&lcy;&kcy;&icy;, &ncy;&acy;&scy;&tcy;&rcy;&ocy;&iecy;&ncy;&ncy;&ocy;&jcy; &dcy;&lcy;&yacy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&iecy;&gcy;&ocy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &ucy;&scy;&tcy;&rcy;&ocy;&jcy;&scy;&tcy;&vcy;&acy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yacy; &ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&ocy;&jcy; &chcy;&acy;&scy;&tcy;&icy; &dcy;&ocy;  &quot;*&quot; . &Ecy;&tcy;&ocy; &pcy;&ocy;&dcy;&scy;&kcy;&acy;&zhcy;&iecy;&tcy; &ncy;&acy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>hack</code>  &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&vcy;&icy; &pcy;&rcy;&icy; &ocy;&tcy;&vcy;&iecy;&tcy;&vcy;&lcy;&iecy;&ncy;&icy;&icy; &ocy;&tcy;  <code>origin/hack</code>  (&icy;&lcy;&icy;  <code>remotes/origin/hack</code> , &icy;&lcy;&icy; &dcy;&acy;&zhcy;&iecy;  <code>refs/remotes/origin/hack</code> ). &IEcy;&scy;&lcy;&icy; &dcy;&acy;&ncy;&ncy;&ocy;&iecy; &icy;&mcy;&yacy; &ncy;&iecy; &icy;&mcy;&iecy;&iecy;&tcy; &kcy;&ocy;&scy;&ocy;&jcy; &chcy;&iecy;&rcy;&tcy;&ycy; &icy;&lcy;&icy; &vcy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&iecy; &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &vcy;&ycy;&shcy;&iecy; &ucy;&gcy;&acy;&dcy;&ycy;&vcy;&acy;&ncy;&icy;&yacy; &icy;&mcy;&yacy; &ocy;&scy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&ucy;&scy;&tcy;&ycy;&mcy;, &ucy;&gcy;&acy;&dcy;&ycy;&vcy;&acy;&ncy;&icy;&iecy; &pcy;&rcy;&iecy;&rcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;. &Vcy; &tcy;&acy;&kcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &yacy;&vcy;&ncy;&ocy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &icy;&mcy;&yacy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>-b</code> .</span></p> </dd> <dt id="Documentation/git-checkout.txt---no-track"><span data-i18n="342cafefd8b0e94a374cbfbc3bcd715707ad1a0bfc173059f7898fe677b6c6a5/09" data-source="--no-track" onmousemove="i18n(this)">--no-track</span></dt> <dd> <p><span data-i18n="bfe95d38f5141eb58bfd4c776107df1814558f8cb005d971896a79c4db734f6d/a7" data-source="Do not set up &amp;quot;upstream&amp;quot; configuration, even if the &lt;code&gt;branch.autoSetupMerge&lt;/code&gt; configuration variable is true." onmousemove="i18n(this)">&Ncy;&iecy; &ncy;&acy;&scy;&tcy;&rcy;&acy;&icy;&vcy;&acy;&jcy;&tcy;&iecy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&yucy;  &quot;upstream&quot; , &dcy;&acy;&zhcy;&iecy; &iecy;&scy;&lcy;&icy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&acy;&yacy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy;  <code>branch.autoSetupMerge</code>  &icy;&mcy;&iecy;&iecy;&tcy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; true.</span></p> </dd> <dt id="Documentation/git-checkout.txt---guess"><span data-i18n="9a9680e1b4631566776487b9fdfa1883279c3ae2b398250dc25bdea5edb66677/70" data-source="--guess" onmousemove="i18n(this)">--guess</span></dt> <dt id="Documentation/git-checkout.txt---no-guess"><span data-i18n="7cbf50742ed23bc3484c76bff855f21e1e6f8636bf1147443e94f1bc6234d0ec/06" data-source="--no-guess" onmousemove="i18n(this)">--no-guess</span></dt> <dd> <p><span data-i18n="bc8c863aa7955daaa01d2dc8f6b5c15a7981747810184b7b09aaceebbddc6e6e/94" data-source="If &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt; is not found but there does exist a tracking branch in exactly one remote (call it &lt;code&gt;&amp;lt;remote&amp;gt;&lt;/code&gt;) with a matching name, treat as equivalent to" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy;  <code>&lt;branch&gt;</code>  &ncy;&iecy; &ncy;&acy;&jcy;&dcy;&iecy;&ncy;, &ncy;&ocy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &vcy;&iecy;&tcy;&vcy;&softcy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy; &rcy;&ocy;&vcy;&ncy;&ocy; &ncy;&acy; &ocy;&dcy;&ncy;&ocy;&mcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy; (&ncy;&acy;&zcy;&ocy;&vcy;&iecy;&mcy; &iecy;&gcy;&ocy;  <code>&lt;remote&gt;</code> ) &scy; &scy;&ocy;&vcy;&pcy;&acy;&dcy;&acy;&yucy;&shchcy;&icy;&mcy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;, &rcy;&acy;&scy;&scy;&mcy;&acy;&tcy;&rcy;&icy;&vcy;&acy;&jcy;&tcy;&iecy; &iecy;&gcy;&ocy; &kcy;&acy;&kcy; &ecy;&kcy;&vcy;&icy;&vcy;&acy;&lcy;&iecy;&ncy;&tcy;</span></p> <div> <div> <pre class="hljs language-xml">$ git checkout -b <span class="hljs-tag">&lt;<span class="hljs-name">branch</span>&gt;</span> --track <span class="hljs-tag">&lt;<span class="hljs-name">remote</span>&gt;</span>/<span class="hljs-tag">&lt;<span class="hljs-name">branch</span>&gt;</span></pre> </div> </div> <p><span data-i18n="4570dc5605d59ffecd2a1c21e4e18bd4c7a7cdf554b5a61abcd6a97a5272c447/5d" data-source="If the branch exists in multiple remotes and one of them is named by the &lt;code&gt;checkout.defaultRemote&lt;/code&gt; configuration variable, we&amp;rsquo;ll use that one for the purposes of disambiguation, even if the &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt; isn&amp;rsquo;t unique across all remotes. Set it to e.g. &lt;code&gt;checkout.defaultRemote=origin&lt;/code&gt; to always checkout remote branches from there if &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt; is ambiguous but exists on the &lt;code&gt;origin&lt;/code&gt; remote. See also &lt;code&gt;checkout.defaultRemote&lt;/code&gt; in &lt;a href=&quot;git-config&quot;&gt;git-config[1]&lt;/a&gt;." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&iecy;&tcy;&vcy;&softcy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &ncy;&acy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&khcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &ucy;&scy;&tcy;&rcy;&ocy;&jcy;&scy;&tcy;&vcy;&acy;&khcy; &icy; &ocy;&dcy;&icy;&ncy; &icy;&zcy; &ncy;&icy;&khcy; &ncy;&acy;&zcy;&vcy;&acy;&ncy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&ocy;&ncy;&ncy;&ocy;&jcy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&jcy;  <code>checkout.defaultRemote</code> , &mcy;&ycy; &bcy;&ucy;&dcy;&iecy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &iecy;&iecy; &vcy; &tscy;&iecy;&lcy;&yacy;&khcy; &ucy;&scy;&tcy;&rcy;&acy;&ncy;&iecy;&ncy;&icy;&yacy; &ncy;&iecy;&ocy;&dcy;&ncy;&ocy;&zcy;&ncy;&acy;&chcy;&ncy;&ocy;&scy;&tcy;&icy;, &dcy;&acy;&zhcy;&iecy; &iecy;&scy;&lcy;&icy;  <code>&lt;branch&gt;</code>  &ncy;&iecy; &ucy;&ncy;&icy;&kcy;&acy;&lcy;&iecy;&ncy; &dcy;&lcy;&yacy; &vcy;&scy;&iecy;&khcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &ucy;&scy;&tcy;&rcy;&ocy;&jcy;&scy;&tcy;&vcy;. &Ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&iecy; &iecy;&gcy;&ocy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &ncy;&acy;  <code>checkout.defaultRemote=origin</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &pcy;&ocy;&lcy;&ucy;&chcy;&acy;&tcy;&softcy; &ocy;&tcy;&tcy;&ucy;&dcy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&iecy; &vcy;&iecy;&tcy;&kcy;&icy;, &iecy;&scy;&lcy;&icy;  <code>&lt;branch&gt;</code>  &ncy;&iecy;&ocy;&dcy;&ncy;&ocy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy;, &ncy;&ocy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &ncy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy;  <code>origin</code> . &Scy;&mcy;. &tcy;&acy;&kcy;&zhcy;&iecy;  <code>checkout.defaultRemote</code>  &vcy;  <a href="git-config.html">git-config[1]</a> .</span></p> <p><span data-i18n="b07b6677287bc4ae26d6c12408bf95d82840faf1011735f396fc605bd2dd5351/b8" data-source="&lt;code&gt;--guess&lt;/code&gt; is the default behavior. Use &lt;code&gt;--no-guess&lt;/code&gt; to disable it." onmousemove="i18n(this)"><code>--guess</code>  &mdash; &pcy;&ocy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;. &Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>--no-guess</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &iecy;&gcy;&ocy;.</span></p> <p><span data-i18n="43090609dcd0157122827474ae3c54354945a1991565d6d10ec9fc9c5cf0514d/1e" data-source="The default behavior can be set via the &lt;code&gt;checkout.guess&lt;/code&gt; configuration variable." onmousemove="i18n(this)">&Pcy;&ocy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&jcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy;  <code>checkout.guess</code> .</span></p> </dd> <dt id="Documentation/git-checkout.txt--l"><span data-i18n="8d29a0f35918ca625667b2858e1c366e227ecbb424c5b30d008a1b2ec709e6d2/a6" data-source="-l" onmousemove="i18n(this)">-l</span></dt> <dd> <p><span data-i18n="50ad1d5275cf0c876f4c5737603728ed0ca691c84e36e88c82a42b970a6a9793/f0" data-source="Create the new branch&amp;rsquo;s reflog; see &lt;a href=&quot;git-branch&quot;&gt;git-branch[1]&lt;/a&gt; for details." onmousemove="i18n(this)">&Scy;&ocy;&zcy;&dcy;&acy;&jcy;&tcy;&iecy; &rcy;&iecy;&fcy;&lcy;&ocy;&gcy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;; &pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &vcy;  <a href="git-branch.html">git-branch[1]</a> .</span></p> </dd> <dt id="Documentation/git-checkout.txt--d"><span data-i18n="50e09407a18bedd64baf0b99825a8178d7446731615b85452ea6b99573469dcc/b1" data-source="-d" onmousemove="i18n(this)">-d</span></dt> <dt id="Documentation/git-checkout.txt---detach"><span data-i18n="e99a133151b56c8dc47b3f2cb61e20c87d324ff787127783f1eb10a9e185d1d9/98" data-source="--detach" onmousemove="i18n(this)">--detach</span></dt> <dd> <p><span data-i18n="c1cf8fe3be3754cf7826958c6cad7fac22eb27db35d0e304804332552c362eb2/f4" data-source="Rather than checking out a branch to work on it, check out a commit for inspection and discardable experiments. This is the default behavior of &lt;code&gt;git checkout &amp;lt;commit&amp;gt;&lt;/code&gt; when &lt;code&gt;&amp;lt;commit&amp;gt;&lt;/code&gt; is not a branch name. See the &amp;quot;DETACHED HEAD&amp;quot; section below for details." onmousemove="i18n(this)">&Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&tcy;&softcy; &vcy;&iecy;&tcy;&kcy;&ucy; &dcy;&lcy;&yacy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy; &ncy;&acy;&dcy; &ncy;&iecy;&jcy;, &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&softcy;&tcy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &dcy;&lcy;&yacy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&icy; &icy; &ocy;&tcy;&bcy;&rcy;&acy;&scy;&ycy;&vcy;&acy;&iecy;&mcy;&ycy;&khcy; &ecy;&kcy;&scy;&pcy;&iecy;&rcy;&icy;&mcy;&iecy;&ncy;&tcy;&ocy;&vcy;. &Ecy;&tcy;&ocy; &pcy;&ocy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&iecy;  <code>git checkout &lt;commit&gt;</code>  &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;, &kcy;&ocy;&gcy;&dcy;&acy;  <code>&lt;commit&gt;</code>  &ncy;&iecy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy; &vcy;&iecy;&tcy;&kcy;&icy;. &Pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &vcy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;  &quot;DETACHED HEAD&quot;  &ncy;&icy;&zhcy;&iecy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt---orphanltnew-branchgt"><span data-i18n="f5564925c764f627529f06423a7be89b7af61f9146ac55177472bb676e05e342/c9" data-source="--orphan &amp;lt;new-branch&amp;gt;" onmousemove="i18n(this)">--orphan &lt;new-branch&gt;</span></dt> <dd> <p><span data-i18n="0597df6399938f1b8350702d80bc5e24ad849fb22dde657f2b104c9d170b4ad2/bb" data-source="Create a new unborn branch, named &lt;code&gt;&amp;lt;new-branch&amp;gt;&lt;/code&gt;, started from &lt;code&gt;&amp;lt;start-point&amp;gt;&lt;/code&gt; and switch to it. The first commit made on this new branch will have no parents and it will be the root of a new history totally disconnected from all the other branches and commits." onmousemove="i18n(this)">&Scy;&ocy;&zcy;&dcy;&acy;&jcy;&tcy;&iecy; &ncy;&ocy;&vcy;&ucy;&yucy; &ncy;&iecy;&rcy;&ocy;&dcy;&icy;&vcy;&shcy;&ucy;&yucy;&scy;&yacy; &vcy;&iecy;&tcy;&kcy;&ucy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>&lt;new-branch&gt;</code> , &ncy;&acy;&chcy;&acy;&vcy; &scy;  <code>&lt;start-point&gt;</code> , &icy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&iecy;&scy;&softcy; &ncy;&acy; &ncy;&iecy;&iecy;. &Pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &scy;&dcy;&iecy;&lcy;&acy;&ncy;&ncy;&ycy;&jcy; &vcy; &ecy;&tcy;&ocy;&jcy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy;, &ncy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&mcy;&iecy;&tcy;&softcy; &rcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&iecy;&jcy; &icy; &scy;&tcy;&acy;&ncy;&iecy;&tcy; &kcy;&ocy;&rcy;&ncy;&iecy;&mcy; &ncy;&ocy;&vcy;&ocy;&jcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy;, &pcy;&ocy;&lcy;&ncy;&ocy;&scy;&tcy;&softcy;&yucy; &ocy;&tcy;&ocy;&rcy;&vcy;&acy;&ncy;&ncy;&ocy;&jcy; &ocy;&tcy; &vcy;&scy;&iecy;&khcy; &dcy;&rcy;&ucy;&gcy;&icy;&khcy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy; &icy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy;.</span></p> <p><span data-i18n="f582b63e9566c6c02ccd7b65e7125f62ce5dc6c2172adc6db54810dfc3deaca0/b4" data-source="The index and the working tree are adjusted as if you had previously run &lt;code&gt;git checkout &amp;lt;start-point&amp;gt;&lt;/code&gt;. This allows you to start a new history that records a set of paths similar to &lt;code&gt;&amp;lt;start-point&amp;gt;&lt;/code&gt; by easily running &lt;code&gt;git commit -a&lt;/code&gt; to make the root commit." onmousemove="i18n(this)">&Icy;&ncy;&dcy;&iecy;&kcy;&scy; &icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ncy;&acy;&scy;&tcy;&rcy;&acy;&icy;&vcy;&acy;&yucy;&tcy;&scy;&yacy; &tcy;&acy;&kcy;, &kcy;&acy;&kcy; &iecy;&scy;&lcy;&icy; &bcy;&ycy; &vcy;&ycy; &rcy;&acy;&ncy;&iecy;&iecy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&lcy;&icy;  <code>git checkout &lt;start-point&gt;</code> . &Ecy;&tcy;&ocy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &vcy;&acy;&mcy; &ncy;&acy;&chcy;&acy;&tcy;&softcy; &ncy;&ocy;&vcy;&ucy;&yucy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yucy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&jcy; &zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy;&bcy;&ocy;&rcy; &pcy;&ucy;&tcy;&iecy;&jcy;, &acy;&ncy;&acy;&lcy;&ocy;&gcy;&icy;&chcy;&ncy;&ycy;&khcy;  <code>&lt;start-point&gt;</code> , &pcy;&ucy;&tcy;&iecy;&mcy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy;&gcy;&ocy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;  <code>git commit -a</code>  &dcy;&lcy;&yacy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&yacy; &kcy;&ocy;&rcy;&ncy;&iecy;&vcy;&ocy;&gcy;&ocy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;.</span></p> <p><span data-i18n="523b2bd716ce4ac17679bbb8c9e4942d41d50f2ad7db51c8af9d157714034fdf/4d" data-source="This can be useful when you want to publish the tree from a commit without exposing its full history. You might want to do this to publish an open source branch of a project whose current tree is &amp;quot;clean&amp;quot;, but whose full history contains proprietary or otherwise encumbered bits of code." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ocy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &ocy;&pcy;&ucy;&bcy;&lcy;&icy;&kcy;&ocy;&vcy;&acy;&tcy;&softcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &icy;&zcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;, &ncy;&iecy; &rcy;&acy;&scy;&kcy;&rcy;&ycy;&vcy;&acy;&yacy; &iecy;&gcy;&ocy; &pcy;&ocy;&lcy;&ncy;&ucy;&yucy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yucy;. &Vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &vcy;&ycy; &zcy;&acy;&khcy;&ocy;&tcy;&icy;&tcy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&pcy;&ucy;&bcy;&lcy;&icy;&kcy;&ocy;&vcy;&acy;&tcy;&softcy; &vcy;&iecy;&tcy;&kcy;&ucy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &scy; &ocy;&tcy;&kcy;&rcy;&ycy;&tcy;&ycy;&mcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ycy;&mcy; &kcy;&ocy;&dcy;&ocy;&mcy;, &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&gcy;&ocy; &mdash;  &quot;clean&quot; , &ncy;&ocy; &pcy;&ocy;&lcy;&ncy;&acy;&yacy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yacy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&gcy;&ocy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy; &pcy;&rcy;&ocy;&pcy;&rcy;&icy;&iecy;&tcy;&acy;&rcy;&ncy;&ycy;&iecy; &icy;&lcy;&icy; &icy;&ncy;&ycy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy; &ocy;&bcy;&rcy;&iecy;&mcy;&iecy;&ncy;&iecy;&ncy;&ncy;&ycy;&iecy; &fcy;&rcy;&acy;&gcy;&mcy;&iecy;&ncy;&tcy;&ycy; &kcy;&ocy;&dcy;&acy;.</span></p> <p><span data-i18n="25345221ffbffc5e4d23c42175304fc8948b5f0d30ff4561ed921cb3b22f5d2a/71" data-source="If you want to start a disconnected history that records a set of paths that is totally different from the one of &lt;code&gt;&amp;lt;start-point&amp;gt;&lt;/code&gt;, then you should clear the index and the working tree right after creating the orphan branch by running &lt;code&gt;git rm -rf .&lt;/code&gt; from the top level of the working tree. Afterwards you will be ready to prepare your new files, repopulating the working tree, by copying them from elsewhere, extracting a tarball, etc." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy; &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&ncy;&ucy;&yucy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yucy;, &zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&yucy;&shchcy;&ucy;&yucy; &ncy;&acy;&bcy;&ocy;&rcy; &pcy;&ucy;&tcy;&iecy;&jcy;, &pcy;&ocy;&lcy;&ncy;&ocy;&scy;&tcy;&softcy;&yucy; &ocy;&tcy;&lcy;&icy;&chcy;&acy;&yucy;&shchcy;&icy;&jcy;&scy;&yacy; &ocy;&tcy; &pcy;&ucy;&tcy;&icy;  <code>&lt;start-point&gt;</code> , &tcy;&ocy; &vcy;&acy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &ocy;&chcy;&icy;&scy;&tcy;&icy;&tcy;&softcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&rcy;&acy;&zcy;&ucy; &pcy;&ocy;&scy;&lcy;&iecy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&yacy; &pcy;&ocy;&tcy;&iecy;&rcy;&yacy;&ncy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;, &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&vcy;  <code>git rm -rf .</code>  &scy; &vcy;&iecy;&rcy;&khcy;&ncy;&iecy;&gcy;&ocy; &ucy;&rcy;&ocy;&vcy;&ncy;&yacy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;. &Pcy;&ocy;&scy;&lcy;&iecy; &ecy;&tcy;&ocy;&gcy;&ocy; &vcy;&ycy; &bcy;&ucy;&dcy;&iecy;&tcy;&iecy; &gcy;&ocy;&tcy;&ocy;&vcy;&ycy; &pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&icy;&tcy;&softcy; &ncy;&ocy;&vcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;, &zcy;&acy;&ncy;&ocy;&vcy;&ocy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &scy;&kcy;&ocy;&pcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &icy;&khcy; &icy;&zcy; &dcy;&rcy;&ucy;&gcy;&ocy;&gcy;&ocy; &mcy;&iecy;&scy;&tcy;&acy;, &rcy;&acy;&scy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&tcy;&softcy; &acy;&rcy;&khcy;&icy;&vcy; &icy; &tcy;.&nbsp;&dcy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt---ignore-skip-worktree-bits"><span data-i18n="ccef600f0052473096f7dbcd41f7e624748accd9277f4b76bc32559d64994248/c3" data-source="--ignore-skip-worktree-bits" onmousemove="i18n(this)">--ignore-skip-worktree-bits</span></dt> <dd> <p><span data-i18n="b30221526a69b3d929b6a3a3ebb587d895c7f161d6fc974dea7d3be6a6230715/9f" data-source="In sparse checkout mode, &lt;code&gt;git checkout -- &amp;lt;paths&amp;gt;&lt;/code&gt; would update only entries matched by &lt;code&gt;&amp;lt;paths&amp;gt;&lt;/code&gt; and sparse patterns in &lt;code&gt;$GIT_DIR/info/sparse-checkout&lt;/code&gt;. This option ignores the sparse patterns and adds back any files in &lt;code&gt;&amp;lt;paths&amp;gt;&lt;/code&gt;." onmousemove="i18n(this)">&Vcy; &rcy;&iecy;&zhcy;&icy;&mcy;&iecy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ocy;&jcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&icy;  <code>git checkout -- &lt;paths&gt;</code>  &bcy;&ucy;&dcy;&iecy;&tcy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &zcy;&acy;&pcy;&icy;&scy;&icy;, &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&iecy;  <code>&lt;paths&gt;</code> , &icy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ycy;&iecy; &shcy;&acy;&bcy;&lcy;&ocy;&ncy;&ycy; &vcy;  <code>$GIT_DIR/info/sparse-checkout</code> . &Ecy;&tcy;&ocy;&tcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy; &icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ucy;&iecy;&tcy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ycy;&iecy; &shcy;&acy;&bcy;&lcy;&ocy;&ncy;&ycy; &icy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &ocy;&bcy;&rcy;&acy;&tcy;&ncy;&ocy; &vcy;&scy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy;  <code>&lt;paths&gt;</code> .</span></p> </dd> <dt id="Documentation/git-checkout.txt--m"><span data-i18n="c4e153afb4aeaa5818fb08325ebff59f883a0482006aa3cc1c17c9b393e54efa/11" data-source="-m" onmousemove="i18n(this)">-m</span></dt> <dt id="Documentation/git-checkout.txt---merge"><span data-i18n="8fb0e06813ad30153047701775d50b3c457f0df427ea7a690312a21a2e94ea2d/e9" data-source="--merge" onmousemove="i18n(this)">--merge</span></dt> <dd> <p><span data-i18n="6a961cf7289a016f41570299bee28b3dcc829cefb481cff6d15de3a11af8bd33/85" data-source="When switching branches, if you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context. However, with this option, a three-way merge between the current branch, your working tree contents, and the new branch is done, and you will be on the new branch." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&icy; &vcy;&iecy;&tcy;&ocy;&kcy;, &iecy;&scy;&lcy;&icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &ocy;&dcy;&ncy;&ocy;&mcy; &icy;&lcy;&icy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&khcy; &fcy;&acy;&jcy;&lcy;&acy;&khcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &ocy;&tcy;&lcy;&icy;&chcy;&acy;&yucy;&tcy;&scy;&yacy; &vcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy; &icy; &vcy;&iecy;&tcy;&kcy;&iecy;, &ncy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &vcy;&ycy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&acy;&iecy;&tcy;&iecy;&scy;&softcy;, &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &ocy;&tcy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&acy;&tcy;&softcy; &vcy;&iecy;&tcy;&kcy;&icy;, &chcy;&tcy;&ocy;&bcy;&ycy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&icy;&tcy;&softcy; &vcy;&acy;&shcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &kcy;&ocy;&ncy;&tcy;&iecy;&kcy;&scy;&tcy;&iecy;. &Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &pcy;&rcy;&icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&icy; &ecy;&tcy;&ocy;&jcy; &ocy;&pcy;&tscy;&icy;&icy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&gcy;&ocy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &icy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&ocy;, &icy; &vcy;&ycy; &ocy;&kcy;&acy;&zhcy;&iecy;&tcy;&iecy;&scy;&softcy; &vcy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy;.</span></p> <p><span data-i18n="22be71691ee99f5398301b2a1f81ff93fb21958bc911fbbf2936448a029c73a6/78" data-source="When a merge conflict happens, the index entries for conflicting paths are left unmerged, and you need to resolve the conflicts and mark the resolved paths with &lt;code&gt;git add&lt;/code&gt; (or &lt;code&gt;git rm&lt;/code&gt; if the merge should result in deletion of the path)." onmousemove="i18n(this)">&Kcy;&ocy;&gcy;&dcy;&acy; &pcy;&rcy;&ocy;&icy;&scy;&khcy;&ocy;&dcy;&icy;&tcy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;, &zcy;&acy;&pcy;&icy;&scy;&icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &dcy;&lcy;&yacy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ucy;&yucy;&shchcy;&icy;&khcy; &pcy;&ucy;&tcy;&iecy;&jcy; &ocy;&scy;&tcy;&acy;&yucy;&tcy;&scy;&yacy; &ncy;&iecy;&scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&mcy;&icy;, &icy; &vcy;&acy;&mcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&icy;&tcy;&softcy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ycy; &icy; &pcy;&ocy;&mcy;&iecy;&tcy;&icy;&tcy;&softcy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&iecy;&ncy;&ncy;&ycy;&iecy; &pcy;&ucy;&tcy;&icy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git add</code>  (&icy;&lcy;&icy;  <code>git rm</code> , &iecy;&scy;&lcy;&icy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ocy; &pcy;&rcy;&icy;&vcy;&iecy;&scy;&tcy;&icy; &kcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yucy; &pcy;&ucy;&tcy;&icy;).</span></p> <p><span data-i18n="92c8ea80608434db225fc1b8f5f8e7511f5d97b15598fc66f2516b6d22240a30/48" data-source="When checking out paths from the index, this option lets you recreate the conflicted merge in the specified paths. This option cannot be used when checking out paths from a tree-ish." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&icy; &pcy;&ucy;&tcy;&iecy;&jcy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &ecy;&tcy;&ocy;&tcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &vcy;&ocy;&scy;&scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ucy;&yucy;&shchcy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &vcy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ycy;&khcy; &pcy;&ucy;&tcy;&yacy;&khcy;. &Ecy;&tcy;&ucy; &ocy;&pcy;&tscy;&icy;&yucy; &ncy;&iecy;&lcy;&softcy;&zcy;&yacy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &pcy;&rcy;&icy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&iecy; &pcy;&ucy;&tcy;&iecy;&jcy; &icy;&zcy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;.</span></p> <p><span data-i18n="f3d5c53b11c4ac9d2aca26fb426b66ec7c3365e122d3781df4d57771ba663f39/ee" data-source="When switching branches with &lt;code&gt;--merge&lt;/code&gt;, staged changes may be lost." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&icy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>--merge</code>  &pcy;&ocy;&ecy;&tcy;&acy;&pcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &mcy;&ocy;&gcy;&ucy;&tcy; &bcy;&ycy;&tcy;&softcy; &pcy;&ocy;&tcy;&iecy;&rcy;&yacy;&ncy;&ycy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt---conflictltstylegt"><span data-i18n="522ba95fd12b03c4081b08801471a2fb60e94274c716618989f36c5712e120bb/75" data-source="--conflict=&amp;lt;style&amp;gt;" onmousemove="i18n(this)">--conflict=&lt;style&gt;</span></dt> <dd> <p><span data-i18n="bfb91f04111fbbb56de36a0c77b1835a15e65a00caf1995c2b9ccc44bbd78f27/4b" data-source="The same as &lt;code&gt;--merge&lt;/code&gt; option above, but changes the way the conflicting hunks are presented, overriding the &lt;code&gt;merge.conflictStyle&lt;/code&gt; configuration variable. Possible values are &amp;quot;merge&amp;quot; (default), &amp;quot;diff3&amp;quot;, and &amp;quot;zdiff3&amp;quot;." onmousemove="i18n(this)">&Tcy;&ocy; &zhcy;&iecy;, &chcy;&tcy;&ocy; &icy; &ocy;&pcy;&tscy;&icy;&yacy;  <code>--merge</code>  &vcy;&ycy;&shcy;&iecy;, &ncy;&ocy; &mcy;&iecy;&ncy;&yacy;&iecy;&tcy; &scy;&pcy;&ocy;&scy;&ocy;&bcy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ucy;&yucy;&shchcy;&icy;&khcy; &fcy;&rcy;&acy;&gcy;&mcy;&iecy;&ncy;&tcy;&ocy;&vcy;, &pcy;&iecy;&rcy;&iecy;&ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&yacy;&yacy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ucy;&yucy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy;  <code>merge.conflictStyle</code> . &Vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ycy;&iecy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy;:  &quot;merge&quot;  (&pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;),  &quot;diff3&quot;  &icy;  &quot;zdiff3&quot; .</span></p> </dd> <dt id="Documentation/git-checkout.txt--p"><span data-i18n="567479c447e472328522a1d759aabb9b579e4522a6da547c983d29e94c1604c2/a3" data-source="-p" onmousemove="i18n(this)">-p</span></dt> <dt id="Documentation/git-checkout.txt---patch"><span data-i18n="7bbfb9636bd1ed3b4d0a3db1cafae5a073c8b069ffda4dcb6cbe8b2a921024c5/4f" data-source="--patch" onmousemove="i18n(this)">--patch</span></dt> <dd> <p><span data-i18n="68ee783312408a8be641c9926afc326086e59125ba01726490c9ee12a3d67ca5/e1" data-source="Interactively select hunks in the difference between the &lt;code&gt;&amp;lt;tree-ish&amp;gt;&lt;/code&gt; (or the index, if unspecified) and the working tree. The chosen hunks are then applied in reverse to the working tree (and if a &lt;code&gt;&amp;lt;tree-ish&amp;gt;&lt;/code&gt; was specified, the index)." onmousemove="i18n(this)">&Vcy; &icy;&ncy;&tcy;&iecy;&rcy;&acy;&kcy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &rcy;&iecy;&zhcy;&icy;&mcy;&iecy; &vcy;&ycy;&bcy;&iecy;&rcy;&icy;&tcy;&iecy; &fcy;&rcy;&acy;&gcy;&mcy;&iecy;&ncy;&tcy;&ycy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ycy; &mcy;&iecy;&zhcy;&dcy;&ucy;  <code>&lt;tree-ish&gt;</code>  (&icy;&lcy;&icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ocy;&mcy;, &iecy;&scy;&lcy;&icy; &ocy;&ncy; &ncy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;) &icy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;. &Vcy;&ycy;&bcy;&rcy;&acy;&ncy;&ncy;&ycy;&iecy; &fcy;&rcy;&acy;&gcy;&mcy;&iecy;&ncy;&tcy;&ycy; &zcy;&acy;&tcy;&iecy;&mcy; &pcy;&rcy;&icy;&mcy;&iecy;&ncy;&yacy;&yucy;&tcy;&scy;&yacy; &vcy; &ocy;&bcy;&rcy;&acy;&tcy;&ncy;&ocy;&mcy; &pcy;&ocy;&rcy;&yacy;&dcy;&kcy;&iecy; &kcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy;&ucy; &dcy;&iecy;&rcy;&iecy;&vcy;&ucy; (&icy;, &iecy;&scy;&lcy;&icy; &bcy;&ycy;&lcy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;  <code>&lt;tree-ish&gt;</code> , &kcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ucy;).</span></p> <p><span data-i18n="babaab12aa16d8c4165be9bf0f1424262c9107900fa65b78afe1baa97bb646a5/db" data-source="This means that you can use &lt;code&gt;git checkout -p&lt;/code&gt; to selectively discard edits from your current working tree. See the &amp;ldquo;Interactive Mode&amp;rdquo; section of &lt;a href=&quot;git-add&quot;&gt;git-add[1]&lt;/a&gt; to learn how to operate the &lt;code&gt;--patch&lt;/code&gt; mode." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>git checkout -p</code>  &dcy;&lcy;&yacy; &vcy;&ycy;&bcy;&ocy;&rcy;&ocy;&chcy;&ncy;&ocy;&gcy;&ocy; &ocy;&tcy;&kcy;&lcy;&ocy;&ncy;&iecy;&ncy;&icy;&yacy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy; &icy;&zcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Scy;&mcy;. &rcy;&acy;&zcy;&dcy;&iecy;&lcy; &laquo;&Icy;&ncy;&tcy;&iecy;&rcy;&acy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy;&jcy; &rcy;&iecy;&zhcy;&icy;&mcy;&raquo;  <a href="git-add.html">git-add[1]</a> , &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&zcy;&ncy;&acy;&tcy;&softcy;, &kcy;&acy;&kcy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&tcy;&softcy; &vcy; &rcy;&iecy;&zhcy;&icy;&mcy;&iecy;  <code>--patch</code> .</span></p> <p><span data-i18n="6b1906d6618086a8776d6c484c7bc445e526414573c15d3cd0a8f493d6edb987/01" data-source="Note that this option uses the no overlay mode by default (see also &lt;code&gt;--overlay&lt;/code&gt;), and currently doesn&amp;rsquo;t support overlay mode." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &ecy;&tcy;&ocy;&tcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &rcy;&iecy;&zhcy;&icy;&mcy; &bcy;&iecy;&zcy; &ncy;&acy;&lcy;&ocy;&zhcy;&iecy;&ncy;&icy;&yacy; (&scy;&mcy;. &tcy;&acy;&kcy;&zhcy;&iecy;  <code>--overlay</code> ) &icy; &vcy; &ncy;&acy;&scy;&tcy;&ocy;&yacy;&shchcy;&iecy;&iecy; &vcy;&rcy;&iecy;&mcy;&yacy; &ncy;&iecy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&iecy;&tcy; &rcy;&iecy;&zhcy;&icy;&mcy; &ncy;&acy;&lcy;&ocy;&zhcy;&iecy;&ncy;&icy;&yacy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt---ignore-other-worktrees"><span data-i18n="b60baf02c2e20eff4ae5235ff23bb8326f4ee55bc83d0e2b956d5e5eb62c9320/df" data-source="--ignore-other-worktrees" onmousemove="i18n(this)">--ignore-other-worktrees</span></dt> <dd> <p><span data-i18n="c13d0489519fe4e41afd96b29283b424a29f753f59c4952a7846a9a6ee3f806a/c8" data-source="&lt;code&gt;git checkout&lt;/code&gt; refuses when the wanted ref is already checked out by another worktree. This option makes it check the ref out anyway. In other words, the ref can be held by more than one worktree." onmousemove="i18n(this)"><code>git checkout</code>  &ocy;&tcy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;, &kcy;&ocy;&gcy;&dcy;&acy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&mcy;&acy;&yacy; &scy;&scy;&ycy;&lcy;&kcy;&acy; &ucy;&zhcy;&iecy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&acy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;. &Ecy;&tcy;&acy; &ocy;&pcy;&tscy;&icy;&yacy; &vcy; &lcy;&yucy;&bcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &zcy;&acy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &iecy;&gcy;&ocy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&tcy;&softcy; &scy;&scy;&ycy;&lcy;&kcy;&ucy;. &Dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ocy;&vcy;&acy;&mcy;&icy;, &scy;&scy;&ycy;&lcy;&kcy;&acy; &mcy;&ocy;&zhcy;&iecy;&tcy; &khcy;&rcy;&acy;&ncy;&icy;&tcy;&softcy;&scy;&yacy; &bcy;&ocy;&lcy;&iecy;&iecy; &chcy;&iecy;&mcy; &vcy; &ocy;&dcy;&ncy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt---overwrite-ignore"><span data-i18n="853f0aaf4eb80889e32fb23df7cc8d15f91c4da4b995e866ac49c34729ce1fba/c1" data-source="--overwrite-ignore" onmousemove="i18n(this)">--overwrite-ignore</span></dt> <dt id="Documentation/git-checkout.txt---no-overwrite-ignore"><span data-i18n="93ee31ce8480dd50140d45d57a04e27c9c433c5b94cadcdb1bc1b563f01527b6/74" data-source="--no-overwrite-ignore" onmousemove="i18n(this)">--no-overwrite-ignore</span></dt> <dd> <p><span data-i18n="df3201af710c6be4056c3e9cafe4674f658d7374e58413b2522ea987190507ed/b1" data-source="Silently overwrite ignored files when switching branches. This is the default behavior. Use &lt;code&gt;--no-overwrite-ignore&lt;/code&gt; to abort the operation when the new branch contains ignored files." onmousemove="i18n(this)">&Tcy;&icy;&khcy;&ocy; &pcy;&iecy;&rcy;&iecy;&zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&tcy;&softcy; &icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ucy;&iecy;&mcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &pcy;&rcy;&icy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&icy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy;. &Ecy;&tcy;&ocy; &pcy;&ocy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;. &Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>--no-overwrite-ignore</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&iecy;&rcy;&vcy;&acy;&tcy;&softcy; &ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&yucy;, &iecy;&scy;&lcy;&icy; &ncy;&ocy;&vcy;&acy;&yacy; &vcy;&iecy;&tcy;&vcy;&softcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy; &icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ucy;&iecy;&mcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt---recurse-submodules"><span data-i18n="2231f8979cc1799feb27527355da56bc90932af42030d2159c151d968a21c515/a1" data-source="--recurse-submodules" onmousemove="i18n(this)">--recurse-submodules</span></dt> <dt id="Documentation/git-checkout.txt---no-recurse-submodules"><span data-i18n="ee4f361b3708c726b2f1293d566df473542bac3b43b3608403ec7478dd8ce95f/00" data-source="--no-recurse-submodules" onmousemove="i18n(this)">--no-recurse-submodules</span></dt> <dd> <p><span data-i18n="3669804865700b6ca78818e3a8cb08bf15f8f564b43a4fd56d071338b90f9b13/0e" data-source="Using &lt;code&gt;--recurse-submodules&lt;/code&gt; will update the content of all active submodules according to the commit recorded in the superproject. If local modifications in a submodule would be overwritten the checkout will fail unless &lt;code&gt;-f&lt;/code&gt; is used. If nothing (or &lt;code&gt;--no-recurse-submodules&lt;/code&gt;) is used, submodules working trees will not be updated. Just like &lt;a href=&quot;git-submodule&quot;&gt;git-submodule[1]&lt;/a&gt;, this will detach &lt;code&gt;HEAD&lt;/code&gt; of the submodule." onmousemove="i18n(this)">&Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;  <code>--recurse-submodules</code>  &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &vcy;&scy;&iecy;&khcy; &acy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy;&khcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy; &vcy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&icy;&icy; &scy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&mcy;, &zcy;&acy;&pcy;&icy;&scy;&acy;&ncy;&ncy;&ycy;&mcy; &vcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&iecy;. &IEcy;&scy;&lcy;&icy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy; &bcy;&ucy;&dcy;&ucy;&tcy; &pcy;&iecy;&rcy;&iecy;&zcy;&acy;&pcy;&icy;&scy;&acy;&ncy;&ycy;, &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&acy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&icy;&tcy;&scy;&yacy; &ncy;&iecy;&ucy;&dcy;&acy;&chcy;&iecy;&jcy;, &iecy;&scy;&lcy;&icy; &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>-f</code> . &IEcy;&scy;&lcy;&icy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy; (&icy;&lcy;&icy;  <code>--no-recurse-submodules</code>  ) &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;, &rcy;&acy;&bcy;&ocy;&chcy;&icy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&tcy;&softcy;&scy;&yacy; &ncy;&iecy; &bcy;&ucy;&dcy;&ucy;&tcy;. &Kcy;&acy;&kcy; &icy; &vcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &scy;  <a href="git-submodule.html">git-submodule[1]</a> , &ecy;&tcy;&ocy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&icy;&tcy; &ocy;&tcy;&scy;&ocy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy;  <code>HEAD</code>  &ocy;&tcy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt---overlay"><span data-i18n="d1b5e61bf4e2c8ee54feb467d946a4318c07a1c502578fb5dd884e87a89a81d1/e3" data-source="--overlay" onmousemove="i18n(this)">--overlay</span></dt> <dt id="Documentation/git-checkout.txt---no-overlay"><span data-i18n="92c76ce8c4f0002baff4fade35b7bb975bcaa7d406c4e3ee50cd690629ba4c8e/34" data-source="--no-overlay" onmousemove="i18n(this)">--no-overlay</span></dt> <dd> <p><span data-i18n="7fa17403c5b179abe437922cbb9ab22225cb5055b7fc9679193aae16f4df26e1/61" data-source="In the default overlay mode, &lt;code&gt;git checkout&lt;/code&gt; never removes files from the index or the working tree. When specifying &lt;code&gt;--no-overlay&lt;/code&gt;, files that appear in the index and working tree, but not in &lt;code&gt;&amp;lt;tree-ish&amp;gt;&lt;/code&gt; are removed, to make them match &lt;code&gt;&amp;lt;tree-ish&amp;gt;&lt;/code&gt; exactly." onmousemove="i18n(this)">&Vcy; &rcy;&iecy;&zhcy;&icy;&mcy;&iecy; &ncy;&acy;&lcy;&ocy;&zhcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;  <code>git checkout</code>  &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy; &fcy;&acy;&jcy;&lcy;&ycy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &icy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Pcy;&rcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&icy;&icy;  <code>--no-overlay</code>  &fcy;&acy;&jcy;&lcy;&ycy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &pcy;&ocy;&yacy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy; &icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &ncy;&ocy; &ncy;&iecy; &vcy;  <code>&lt;tree-ish&gt;</code> , &ucy;&dcy;&acy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&ncy;&icy; &tcy;&ocy;&chcy;&ncy;&ocy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&lcy;&icy;  <code>&lt;tree-ish&gt;</code> .</span></p> </dd> <dt id="Documentation/git-checkout.txt---pathspec-from-fileltfilegt"><span data-i18n="da8857eb3d44efb4cdb38781f7cc2d2dd9074dc3c2a6ca51bd424135fedabfd0/18" data-source="--pathspec-from-file=&amp;lt;file&amp;gt;" onmousemove="i18n(this)">--pathspec-from-file=&lt;file&gt;</span></dt> <dd> <p><span data-i18n="edbea5c504ccb9748dfc5d09bca08d1600446d3e324d8503642ae08801e92fce/7b" data-source="Pathspec is passed in &lt;code&gt;&amp;lt;file&amp;gt;&lt;/code&gt; instead of commandline args. If &lt;code&gt;&amp;lt;file&amp;gt;&lt;/code&gt; is exactly &lt;code&gt;-&lt;/code&gt; then standard input is used. Pathspec elements are separated by LF or CR/LF. Pathspec elements can be quoted as explained for the configuration variable &lt;code&gt;core.quotePath&lt;/code&gt; (see &lt;a href=&quot;git-config&quot;&gt;git-config[1]&lt;/a&gt;). See also &lt;code&gt;--pathspec-file-nul&lt;/code&gt; and global &lt;code&gt;--literal-pathspecs&lt;/code&gt;." onmousemove="i18n(this)">&Scy;&pcy;&iecy;&tscy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&yacy; &pcy;&ucy;&tcy;&icy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy;  <code>&lt;file&gt;</code>  &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ocy;&vcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy;. &IEcy;&scy;&lcy;&icy;  <code>&lt;file&gt;</code>  &mdash; &ecy;&tcy;&ocy; &tcy;&ocy;&chcy;&ncy;&ocy;  <code>-</code> , &tcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &scy;&tcy;&acy;&ncy;&dcy;&acy;&rcy;&tcy;&ncy;&ycy;&jcy; &vcy;&vcy;&ocy;&dcy;. &Ecy;&lcy;&iecy;&mcy;&iecy;&ncy;&tcy;&ycy; Pathspec &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; LF &icy;&lcy;&icy; CR/LF. &Ecy;&lcy;&iecy;&mcy;&iecy;&ncy;&tcy;&ycy; Pathspec &mcy;&ocy;&zhcy;&ncy;&ocy; &zcy;&acy;&kcy;&lcy;&yucy;&chcy;&acy;&tcy;&softcy; &vcy; &kcy;&acy;&vcy;&ycy;&chcy;&kcy;&icy;, &kcy;&acy;&kcy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&ocy; &dcy;&lcy;&yacy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&jcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy;  <code>core.quotePath</code>  (&scy;&mcy;.  <a href="git-config.html">git-config[1]</a> ). &Scy;&mcy;. &tcy;&acy;&kcy;&zhcy;&iecy;  <code>--pathspec-file-nul</code>  &icy; &gcy;&lcy;&ocy;&bcy;&acy;&lcy;&softcy;&ncy;&ycy;&jcy;  <code>--literal-pathspecs</code> .</span></p> </dd> <dt id="Documentation/git-checkout.txt---pathspec-file-nul"><span data-i18n="425e5942f80034f1f089327693cf66158c953fde8f89bae24b0fbc651b9af0e9/1a" data-source="--pathspec-file-nul" onmousemove="i18n(this)">--pathspec-file-nul</span></dt> <dd> <p><span data-i18n="7e27df84b5773075cf108a34f1dc37f2f6a47f96c09842b70ed9d300ad32e7c1/c3" data-source="Only meaningful with &lt;code&gt;--pathspec-from-file&lt;/code&gt;. Pathspec elements are separated with NUL character and all other characters are taken literally (including newlines and quotes)." onmousemove="i18n(this)">&Icy;&mcy;&iecy;&iecy;&tcy; &scy;&mcy;&ycy;&scy;&lcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &scy;  <code>--pathspec-from-file</code> . &Ecy;&lcy;&iecy;&mcy;&iecy;&ncy;&tcy;&ycy; Pathspec &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&ocy;&mcy; NUL, &acy; &vcy;&scy;&iecy; &ocy;&scy;&tcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&ycy; &vcy;&ocy;&scy;&pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&yucy;&tcy;&scy;&yacy; &bcy;&ucy;&kcy;&vcy;&acy;&lcy;&softcy;&ncy;&ocy; (&vcy;&kcy;&lcy;&yucy;&chcy;&acy;&yacy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&ycy; &ncy;&ocy;&vcy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy; &icy; &kcy;&acy;&vcy;&ycy;&chcy;&kcy;&icy;).</span></p> </dd> <dt id="Documentation/git-checkout.txt-ltbranchgt"><span data-i18n="94df72f0586b2624e4bed1636ef620831ed977b0919e4b2d474387cb849182d7/40" data-source="&amp;lt;branch&amp;gt;" onmousemove="i18n(this)">&lt;branch&gt;</span></dt> <dd> <p><span data-i18n="da2e1c6fd0ac07e413476791f6b259a639ee5ad0041c9a20a6e17e51d781e654/df" data-source="Branch to checkout; if it refers to a branch (i.e., a name that, when prepended with &amp;quot;refs/heads/&amp;quot;, is a valid ref), then that branch is checked out. Otherwise, if it refers to a valid commit, your &lt;code&gt;HEAD&lt;/code&gt; becomes &amp;quot;detached&amp;quot; and you are no longer on any branch (see below for details)." onmousemove="i18n(this)">&Ocy;&tcy;&dcy;&iecy;&lcy;&iecy;&ncy;&icy;&iecy; &dcy;&lcy;&yacy; &ocy;&fcy;&ocy;&rcy;&mcy;&lcy;&iecy;&ncy;&icy;&yacy; &zcy;&acy;&kcy;&acy;&zcy;&acy;; &iecy;&scy;&lcy;&icy; &ocy;&ncy;&ocy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &vcy;&iecy;&tcy;&kcy;&ucy; (&tcy;. &iecy;. &icy;&mcy;&yacy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy;, &iecy;&scy;&lcy;&icy; &dcy;&ocy;&bcy;&acy;&vcy;&icy;&tcy;&softcy; &kcy; &ncy;&iecy;&mcy;&ucy;  &quot;refs/heads/&quot; , &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &dcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&mcy;&ocy;&jcy; &scy;&scy;&ycy;&lcy;&kcy;&ocy;&jcy;), &tcy;&ocy; &ecy;&tcy;&acy; &vcy;&iecy;&tcy;&kcy;&acy; &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&acy;&iecy;&tcy;&scy;&yacy;. &Vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;, &iecy;&scy;&lcy;&icy; &ecy;&tcy;&ocy; &ocy;&tcy;&ncy;&ocy;&scy;&icy;&tcy;&scy;&yacy; &kcy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&mcy;&ucy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ucy;, &vcy;&acy;&shcy;  <code>HEAD</code>  &scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&scy;&yacy;  &quot;detached&quot; , &icy; &vcy;&ycy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &ncy;&iecy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&iecy;&scy;&softcy; &ncy;&icy; &vcy; &ocy;&dcy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy; (&pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &ncy;&icy;&zhcy;&iecy;).</span></p> <p><span data-i18n="5339aa96a6ae4567eb03c01f0e72159f2561a869d391f504b552dfca1c9d44f1/55" data-source="You can use the &lt;code&gt;@{-N}&lt;/code&gt; syntax to refer to the N-th last branch/commit checked out using &amp;quot;git checkout&amp;quot; operation. You may also specify &lt;code&gt;-&lt;/code&gt; which is synonymous to &lt;code&gt;@{-1}&lt;/code&gt;." onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &scy;&icy;&ncy;&tcy;&acy;&kcy;&scy;&icy;&scy;  <code>@{-N}</code>  &dcy;&lcy;&yacy; &scy;&scy;&ycy;&lcy;&kcy;&icy; &ncy;&acy; N-&yucy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&yucy;&yucy; &vcy;&iecy;&tcy;&vcy;&softcy;/&fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;, &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&ncy;&ucy;&yucy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&icy;  &quot;git checkout&quot; . &Vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;  <code>-</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &scy;&icy;&ncy;&ocy;&ncy;&icy;&mcy;&ocy;&mcy;  <code>@{-1}</code> .</span></p> <p><span data-i18n="e6098adf6c46da34510fdcbef1312e7bd868969e94d9f1a92c1befbcb9634db0/21" data-source="As a special case, you may use &lt;code&gt;A...B&lt;/code&gt; as a shortcut for the merge base of &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt; if there is exactly one merge base. You can leave out at most one of &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt;, in which case it defaults to &lt;code&gt;HEAD&lt;/code&gt;." onmousemove="i18n(this)">&Vcy; &chcy;&acy;&scy;&tcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>A...B</code>  &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &yacy;&rcy;&lcy;&ycy;&kcy;&acy; &dcy;&lcy;&yacy; &bcy;&acy;&zcy;&ycy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;  <code>A</code>  &icy;  <code>B</code> , &iecy;&scy;&lcy;&icy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &rcy;&ocy;&vcy;&ncy;&ocy; &ocy;&dcy;&ncy;&acy; &bcy;&acy;&zcy;&acy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;. &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &ncy;&iecy; &bcy;&ocy;&lcy;&iecy;&iecy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &icy;&zcy;  <code>A</code>  &icy;  <code>B</code> , &vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>HEAD</code> .</span></p> </dd> <dt id="Documentation/git-checkout.txt-ltnew-branchgt"><span data-i18n="cc05730c606a7aee531b304d8509c89d1fe91f51afce94970b896f82af11e74d/73" data-source="&amp;lt;new-branch&amp;gt;" onmousemove="i18n(this)">&lt;new-branch&gt;</span></dt> <dd> <p><span data-i18n="e03fb5361fb058426947fe23820077f1fa23a3a854cb6da105704233a5512307/b0" data-source="Name for the new branch." onmousemove="i18n(this)">&Ncy;&acy;&zcy;&vcy;&acy;&ncy;&icy;&iecy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt-ltstart-pointgt"><span data-i18n="b9705269515268a2b878af904778e88a61f56d3c2f600033f404a48d4f51abc1/bb" data-source="&amp;lt;start-point&amp;gt;" onmousemove="i18n(this)">&lt;start-point&gt;</span></dt> <dd> <p><span data-i18n="d283001e22a6acc9fd5a25a982123bbaf934ca7a2ab25ade3d3cd7b0c43db161/40" data-source="The name of a commit at which to start the new branch; see &lt;a href=&quot;git-branch&quot;&gt;git-branch[1]&lt;/a&gt; for details. Defaults to &lt;code&gt;HEAD&lt;/code&gt;." onmousemove="i18n(this)">&Icy;&mcy;&yacy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;, &scy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&gcy;&ocy; &ncy;&acy;&chcy;&icy;&ncy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&ocy;&vcy;&acy;&yacy; &vcy;&iecy;&tcy;&kcy;&acy;; &pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &vcy;  <a href="git-branch.html">git-branch[1]</a> . &Pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;  <code>HEAD</code> .</span></p> <p><span data-i18n="b7ea723c336e6e66cc1fa15cbdec77d3c2647ab7be211e57f4cccfbedf18042f/9b" data-source="As a special case, you may use &lt;code&gt;&amp;quot;A...B&amp;quot;&lt;/code&gt; as a shortcut for the merge base of &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt; if there is exactly one merge base. You can leave out at most one of &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt;, in which case it defaults to &lt;code&gt;HEAD&lt;/code&gt;." onmousemove="i18n(this)">&Vcy; &chcy;&acy;&scy;&tcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>&quot;A...B&quot;</code>  &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &yacy;&rcy;&lcy;&ycy;&kcy;&acy; &dcy;&lcy;&yacy; &bcy;&acy;&zcy;&ycy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;  <code>A</code>  &icy;  <code>B</code> , &iecy;&scy;&lcy;&icy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &rcy;&ocy;&vcy;&ncy;&ocy; &ocy;&dcy;&ncy;&acy; &bcy;&acy;&zcy;&acy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;. &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &ncy;&iecy; &bcy;&ocy;&lcy;&iecy;&iecy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &icy;&zcy;  <code>A</code>  &icy;  <code>B</code> , &vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>HEAD</code> .</span></p> </dd> <dt id="Documentation/git-checkout.txt-lttree-ishgt"><span data-i18n="ba927cb97921f956a637923238eececdbe61434573cee5965093bfec1df0aa8a/44" data-source="&amp;lt;tree-ish&amp;gt;" onmousemove="i18n(this)">&lt;tree-ish&gt;</span></dt> <dd> <p><span data-i18n="487ed614e2423a650d0606350b8a7b2917bd2ae06cc8142050635fe5be7dd5c3/76" data-source="Tree to checkout from (when paths are given). If not specified, the index will be used." onmousemove="i18n(this)">&Dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &dcy;&lcy;&yacy; &ocy;&fcy;&ocy;&rcy;&mcy;&lcy;&iecy;&ncy;&icy;&yacy; &zcy;&acy;&kcy;&acy;&zcy;&acy; (&iecy;&scy;&lcy;&icy; &zcy;&acy;&dcy;&acy;&ncy;&ycy; &pcy;&ucy;&tcy;&icy;). &IEcy;&scy;&lcy;&icy; &ncy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ocy;, &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;.</span></p> <p><span data-i18n="b7ea723c336e6e66cc1fa15cbdec77d3c2647ab7be211e57f4cccfbedf18042f/9b" data-source="As a special case, you may use &lt;code&gt;&amp;quot;A...B&amp;quot;&lt;/code&gt; as a shortcut for the merge base of &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt; if there is exactly one merge base. You can leave out at most one of &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt;, in which case it defaults to &lt;code&gt;HEAD&lt;/code&gt;." onmousemove="i18n(this)">&Vcy; &chcy;&acy;&scy;&tcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>&quot;A...B&quot;</code>  &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &yacy;&rcy;&lcy;&ycy;&kcy;&acy; &dcy;&lcy;&yacy; &bcy;&acy;&zcy;&ycy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;  <code>A</code>  &icy;  <code>B</code> , &iecy;&scy;&lcy;&icy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &rcy;&ocy;&vcy;&ncy;&ocy; &ocy;&dcy;&ncy;&acy; &bcy;&acy;&zcy;&acy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;. &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &ncy;&iecy; &bcy;&ocy;&lcy;&iecy;&iecy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &icy;&zcy;  <code>A</code>  &icy;  <code>B</code> , &vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>HEAD</code> .</span></p> </dd> <dt id="Documentation/git-checkout.txt---"><span data-i18n="d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c/71" data-source="--" onmousemove="i18n(this)">--</span></dt> <dd> <p><span data-i18n="0ea53dd4a1fb9384edae11ed9c03b5411457806a0ae358d444eb80e48fbc0c0c/07" data-source="Do not interpret any more arguments as options." onmousemove="i18n(this)">&Ncy;&iecy; &icy;&ncy;&tcy;&iecy;&rcy;&pcy;&rcy;&iecy;&tcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ycy;&iecy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ycy; &kcy;&acy;&kcy; &vcy;&acy;&rcy;&icy;&acy;&ncy;&tcy;&ycy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt-ltpathspecgt82308203"><span data-i18n="5c5493d0791d7f222f3401382dbca513ccb6d257ea0ecc4d926b47bd7c332f5f/89" data-source="&amp;lt;pathspec&amp;gt;&amp;hellip;" onmousemove="i18n(this)">&lt;pathspec&gt;&hellip;</span></dt> <dd> <p><span data-i18n="b65e71126afbf536240ddd20bc10384980e807f79d166373fdf224161b686b4e/b6" data-source="Limits the paths affected by the operation." onmousemove="i18n(this)">&Ocy;&gcy;&rcy;&acy;&ncy;&icy;&chcy;&icy;&vcy;&acy;&iecy;&tcy; &pcy;&ucy;&tcy;&icy;, &ncy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&lcy;&icy;&yacy;&iecy;&tcy; &ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&yacy;.</span></p> <p><span data-i18n="650607ea17f595aebbbfe78f73f3a97d6140cbf9f4b2d78e76db3388abadf879/ee" data-source="For more details, see the &lt;code&gt;pathspec&lt;/code&gt; entry in &lt;a href=&quot;gitglossary&quot;&gt;gitglossary[7]&lt;/a&gt;." onmousemove="i18n(this)">&Dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ycy;&iecy; &scy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&yacy; &scy;&mcy;. &vcy; &zcy;&acy;&pcy;&icy;&scy;&icy;  <code>pathspec</code>  &vcy;  <a href="gitglossary.html">gitglossary[7]</a> .</span></p> </dd> </dl> </div> </div> <h2 class="text-body-emphasis"  id="_detached_head"><span data-i18n="e96c4baba500605b39bd210781371f9f4e4d6e44224d4e2a6f57bd3e2e856988/ec" data-source="Detached head" onmousemove="i18n(this)">Detached head</span></h2> <div> <p><span data-i18n="eac9a984db35ee89576daa6ffb7eca9617e9540f33a006daa30c297ca7b7f014/ef" data-source="&lt;code&gt;HEAD&lt;/code&gt; normally refers to a named branch (e.g. &lt;code&gt;master&lt;/code&gt;). Meanwhile, each branch refers to a specific commit. Let&amp;rsquo;s look at a repo with three commits, one of them tagged, and with branch &lt;code&gt;master&lt;/code&gt; checked out:" onmousemove="i18n(this)"><code>HEAD</code>  &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ocy;&tcy;&ncy;&ocy;&scy;&icy;&tcy;&scy;&yacy; &kcy; &icy;&mcy;&iecy;&ncy;&ocy;&vcy;&acy;&ncy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy; (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>master</code> ). &Pcy;&rcy;&icy; &ecy;&tcy;&ocy;&mcy; &kcy;&acy;&zhcy;&dcy;&acy;&yacy; &vcy;&iecy;&tcy;&kcy;&acy; &ocy;&tcy;&ncy;&ocy;&scy;&icy;&tcy;&scy;&yacy; &kcy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy;&ucy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ucy;. &Dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &pcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&icy;&mcy; &ncy;&acy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &scy; &tcy;&rcy;&iecy;&mcy;&yacy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;&mcy;&icy;, &ocy;&dcy;&icy;&ncy; &icy;&zcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&khcy; &pcy;&ocy;&mcy;&iecy;&chcy;&iecy;&ncy;, &icy; &scy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;  <code>master</code> :</span></p> <div> <div> <pre class="hljs language-bash">           HEAD (refers to branch <span class="hljs-string">&apos;master&apos;</span>)
            |
            v
a---b---c  branch <span class="hljs-string">&apos;master&apos;</span> (refers to commit <span class="hljs-string">&apos;c&apos;</span>)
    ^
    |
  tag <span class="hljs-string">&apos;v2.0&apos;</span> (refers to commit <span class="hljs-string">&apos;b&apos;</span>)</pre> </div> </div> <p><span data-i18n="cc2b8f1724bc529f89a3125400b91ab00d5f347b23ddf38b98cbb52b314d1442/5e" data-source="When a commit is created in this state, the branch is updated to refer to the new commit. Specifically, &lt;code&gt;git commit&lt;/code&gt; creates a new commit &lt;code&gt;d&lt;/code&gt;, whose parent is commit &lt;code&gt;c&lt;/code&gt;, and then updates branch &lt;code&gt;master&lt;/code&gt; to refer to new commit &lt;code&gt;d&lt;/code&gt;. &lt;code&gt;HEAD&lt;/code&gt; still refers to branch &lt;code&gt;master&lt;/code&gt; and so indirectly now refers to commit &lt;code&gt;d&lt;/code&gt;:" onmousemove="i18n(this)">&Kcy;&ocy;&gcy;&dcy;&acy; &vcy; &ecy;&tcy;&ocy;&mcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy;&scy;&yacy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &vcy;&iecy;&tcy;&kcy;&acy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &icy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &ncy;&ocy;&vcy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;. &Vcy; &chcy;&acy;&scy;&tcy;&ncy;&ocy;&scy;&tcy;&icy;,  <code>git commit</code>  &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy; &ncy;&ocy;&vcy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  <code>d</code> , &rcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&iecy;&mcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&gcy;&ocy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  <code>c</code> , &acy; &zcy;&acy;&tcy;&iecy;&mcy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&iecy;&tcy; &vcy;&iecy;&tcy;&vcy;&softcy;  <code>master</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&ncy;&acy; &scy;&scy;&ycy;&lcy;&acy;&lcy;&acy;&scy;&softcy; &ncy;&acy; &ncy;&ocy;&vcy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  <code>d</code> .  <code>HEAD</code>  &pcy;&ocy;-&pcy;&rcy;&iecy;&zhcy;&ncy;&iecy;&mcy;&ucy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &vcy;&iecy;&tcy;&kcy;&ucy;  <code>master</code>  &icy;, &scy;&lcy;&iecy;&dcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;, &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &kcy;&ocy;&scy;&vcy;&iecy;&ncy;&ncy;&ocy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  <code>d</code> :</span></p> <div> <div> <pre class="hljs language-sql">$ edit; git <span class="hljs-keyword">add</span>; git <span class="hljs-keyword">commit</span>

               HEAD (refers <span class="hljs-keyword">to</span> branch <span class="hljs-string">&apos;master&apos;</span>)
                <span class="hljs-operator">|</span>
                v
a<span class="hljs-comment">---b---c---d  branch &apos;master&apos; (refers to commit &apos;d&apos;)</span>
    <span class="hljs-operator">^</span>
    <span class="hljs-operator">|</span>
  tag <span class="hljs-string">&apos;v2.0&apos;</span> (refers <span class="hljs-keyword">to</span> <span class="hljs-keyword">commit</span> <span class="hljs-string">&apos;b&apos;</span>)</pre> </div> </div> <p><span data-i18n="e846957742de0a6972089145fc5590be857d87c78df314f64c27f2d54cba37be/c8" data-source="It is sometimes useful to be able to checkout a commit that is not at the tip of any named branch, or even to create a new commit that is not referenced by a named branch. Let&amp;rsquo;s look at what happens when we checkout commit &lt;code&gt;b&lt;/code&gt; (here we show two ways this may be done):" onmousemove="i18n(this)">&Icy;&ncy;&ocy;&gcy;&dcy;&acy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ocy; &icy;&mcy;&iecy;&tcy;&softcy; &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;&scy;&tcy;&softcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&softcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ncy;&iecy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &ncy;&acy; &vcy;&iecy;&rcy;&shcy;&icy;&ncy;&iecy; &kcy;&acy;&kcy;&ocy;&jcy;-&lcy;&icy;&bcy;&ocy; &icy;&mcy;&iecy;&ncy;&ocy;&vcy;&acy;&ncy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;, &icy;&lcy;&icy; &dcy;&acy;&zhcy;&iecy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &ncy;&ocy;&vcy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &ncy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ncy;&iecy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &icy;&mcy;&iecy;&ncy;&ocy;&vcy;&acy;&ncy;&ncy;&acy;&yacy; &vcy;&iecy;&tcy;&vcy;&softcy;. &Dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &pcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&icy;&mcy;, &chcy;&tcy;&ocy; &pcy;&rcy;&ocy;&icy;&scy;&khcy;&ocy;&dcy;&icy;&tcy;, &kcy;&ocy;&gcy;&dcy;&acy; &mcy;&ycy; &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&acy;&iecy;&mcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;  <code>b</code>  (&zcy;&dcy;&iecy;&scy;&softcy; &mcy;&ycy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&mcy; &dcy;&vcy;&acy; &scy;&pcy;&ocy;&scy;&ocy;&bcy;&acy; &ecy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;):</span></p> <div> <div> <pre class="hljs language-bash">$ git checkout v2.0  <span class="hljs-comment"># or</span>
$ git checkout master^^

   HEAD (refers to commit <span class="hljs-string">&apos;b&apos;</span>)
    |
    v
a---b---c---d  branch <span class="hljs-string">&apos;master&apos;</span> (refers to commit <span class="hljs-string">&apos;d&apos;</span>)
    ^
    |
  tag <span class="hljs-string">&apos;v2.0&apos;</span> (refers to commit <span class="hljs-string">&apos;b&apos;</span>)</pre> </div> </div> <p><span data-i18n="40b9a22d606e3859379539244709c2ef6a47d6ca4d8d7db3e1c526b876b7a17e/df" data-source="Notice that regardless of which checkout command we use, &lt;code&gt;HEAD&lt;/code&gt; now refers directly to commit &lt;code&gt;b&lt;/code&gt;. This is known as being in detached &lt;code&gt;HEAD&lt;/code&gt; state. It means simply that &lt;code&gt;HEAD&lt;/code&gt; refers to a specific commit, as opposed to referring to a named branch. Let&amp;rsquo;s see what happens when we create a commit:" onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;: &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy; &ocy;&tcy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy;&ucy;&yucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy; &ocy;&fcy;&ocy;&rcy;&mcy;&lcy;&iecy;&ncy;&icy;&yacy; &zcy;&acy;&kcy;&acy;&zcy;&acy; &mcy;&ycy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;,  <code>HEAD</code>  &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &ncy;&acy;&pcy;&rcy;&yacy;&mcy;&ucy;&yucy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;  <code>b</code> . &Ecy;&tcy;&ocy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;&mcy; &ocy;&tcy;&scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy;  <code>HEAD</code> . &Ecy;&tcy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy;  <code>HEAD</code>  &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &kcy;&ocy;&ncy;&kcy;&rcy;&iecy;&tcy;&ncy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &acy; &ncy;&iecy; &ncy;&acy; &icy;&mcy;&iecy;&ncy;&ocy;&vcy;&acy;&ncy;&ncy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;. &Dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &pcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&icy;&mcy;, &chcy;&tcy;&ocy; &pcy;&rcy;&ocy;&icy;&scy;&khcy;&ocy;&dcy;&icy;&tcy;, &kcy;&ocy;&gcy;&dcy;&acy; &mcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&mcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;:</span></p> <div> <div> <pre class="hljs language-sql">$ edit; git <span class="hljs-keyword">add</span>; git <span class="hljs-keyword">commit</span>

     HEAD (refers <span class="hljs-keyword">to</span> <span class="hljs-keyword">commit</span> <span class="hljs-string">&apos;e&apos;</span>)
      <span class="hljs-operator">|</span>
      v
      e
     <span class="hljs-operator">/</span>
a<span class="hljs-comment">---b---c---d  branch &apos;master&apos; (refers to commit &apos;d&apos;)</span>
    <span class="hljs-operator">^</span>
    <span class="hljs-operator">|</span>
  tag <span class="hljs-string">&apos;v2.0&apos;</span> (refers <span class="hljs-keyword">to</span> <span class="hljs-keyword">commit</span> <span class="hljs-string">&apos;b&apos;</span>)</pre> </div> </div> <p><span data-i18n="35b8312f390db7ce4f82a8c6cd77c84aae8d573018cf4408223ad65d5c0b4ec5/dd" data-source="There is now a new commit &lt;code&gt;e&lt;/code&gt;, but it is referenced only by &lt;code&gt;HEAD&lt;/code&gt;. We can of course add yet another commit in this state:" onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &iecy;&scy;&tcy;&softcy; &ncy;&ocy;&vcy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  <code>e</code> , &ncy;&ocy; &ncy;&acy; &ncy;&iecy;&gcy;&ocy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy;  <code>HEAD</code> . &Mcy;&ycy;, &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ocy;, &mcy;&ocy;&zhcy;&iecy;&mcy; &dcy;&ocy;&bcy;&acy;&vcy;&icy;&tcy;&softcy; &iecy;&shchcy;&iecy; &ocy;&dcy;&icy;&ncy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &vcy; &ecy;&tcy;&ocy;&mcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy;:</span></p> <div> <div> <pre class="hljs language-sql">$ edit; git <span class="hljs-keyword">add</span>; git <span class="hljs-keyword">commit</span>

         HEAD (refers <span class="hljs-keyword">to</span> <span class="hljs-keyword">commit</span> <span class="hljs-string">&apos;f&apos;</span>)
          <span class="hljs-operator">|</span>
          v
      e<span class="hljs-comment">---f</span>
     <span class="hljs-operator">/</span>
a<span class="hljs-comment" title="---b---c---d  branch &apos;master&apos; (refers to commit &apos;d&apos;)">---b---c---d &vcy;&iecy;&tcy;&kcy;&acy; &apos;master&apos; (&ocy;&tcy;&ncy;&ocy;&scy;&icy;&tcy;&scy;&yacy; &kcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &apos;d&apos;)</span>
    <span class="hljs-operator">^</span>
    <span class="hljs-operator">|</span>
  tag <span class="hljs-string">&apos;v2.0&apos;</span> (refers <span class="hljs-keyword">to</span> <span class="hljs-keyword">commit</span> <span class="hljs-string">&apos;b&apos;</span>)</pre> </div> </div> <p><span data-i18n="f4936a651cf1020a72f173dcdac6cb6bf9e62fb80d32696478ca7e5380ef1d97/74" data-source="In fact, we can perform all the normal Git operations. But, let&amp;rsquo;s look at what happens when we then checkout &lt;code&gt;master&lt;/code&gt;:" onmousemove="i18n(this)">&Fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;, &mcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&mcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&tcy;&softcy; &vcy;&scy;&iecy; &ocy;&bcy;&ycy;&chcy;&ncy;&ycy;&iecy; &ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&icy;  Git . &Ncy;&ocy; &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &pcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&icy;&mcy;, &chcy;&tcy;&ocy; &pcy;&rcy;&ocy;&icy;&zcy;&ocy;&jcy;&dcy;&iecy;&tcy;, &kcy;&ocy;&gcy;&dcy;&acy; &mcy;&ycy; &zcy;&acy;&tcy;&iecy;&mcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&mcy;  <code>master</code> :</span></p> <div> <div> <pre class="hljs language-java">$ git checkout master

               <span class="hljs-title function_">HEAD</span> <span class="hljs-params">(refers to branch <span class="hljs-string">&apos;master&apos;</span>)</span>
      e---f     |
     /          v
a---b---c---d  branch <span class="hljs-string">&apos;master&apos;</span> (refers to commit <span class="hljs-string">&apos;d&apos;</span>)
    ^
    |
  tag <span class="hljs-string">&apos;v2.0&apos;</span> (refers to commit <span class="hljs-string">&apos;b&apos;</span>)</pre> </div> </div> <p><span data-i18n="7cdc27d9e2be94d9336855f2ccb7889151761c6ef2b25fccbba8098b9a34e2ae/a8" data-source="It is important to realize that at this point nothing refers to commit &lt;code&gt;f&lt;/code&gt;. Eventually commit &lt;code&gt;f&lt;/code&gt; (and by extension commit &lt;code&gt;e&lt;/code&gt;) will be deleted by the routine Git garbage collection process, unless we create a reference before that happens. If we have not yet moved away from commit &lt;code&gt;f&lt;/code&gt;, any of these will create a reference to it:" onmousemove="i18n(this)">&Vcy;&acy;&zhcy;&ncy;&ocy; &pcy;&ocy;&ncy;&icy;&mcy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy; &ncy;&acy; &dcy;&acy;&ncy;&ncy;&ycy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &ncy;&iecy; &ocy;&tcy;&ncy;&ocy;&scy;&icy;&tcy;&scy;&yacy; &kcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ucy;  <code>f</code> . &Vcy; &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ocy;&mcy; &icy;&tcy;&ocy;&gcy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  <code>f</code>  (&icy;, &kcy;&acy;&kcy; &scy;&lcy;&iecy;&dcy;&scy;&tcy;&vcy;&icy;&iecy;, &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  <code>e</code>  ) &bcy;&ucy;&dcy;&iecy;&tcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy; &ocy;&bcy;&ycy;&chcy;&ncy;&ycy;&mcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&ocy;&mcy; &scy;&bcy;&ocy;&rcy;&kcy;&icy; &mcy;&ucy;&scy;&ocy;&rcy;&acy;  Git , &iecy;&scy;&lcy;&icy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &mcy;&ycy; &ncy;&iecy; &scy;&ocy;&zcy;&dcy;&acy;&dcy;&icy;&mcy; &scy;&scy;&ycy;&lcy;&kcy;&ucy; &dcy;&ocy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy; &ecy;&tcy;&ocy; &pcy;&rcy;&ocy;&icy;&zcy;&ocy;&jcy;&dcy;&iecy;&tcy;. &IEcy;&scy;&lcy;&icy; &mcy;&ycy; &iecy;&shchcy;&iecy; &ncy;&iecy; &ocy;&tcy;&ocy;&shcy;&lcy;&icy; &ocy;&tcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;  <code>f</code> , &lcy;&yucy;&bcy;&ocy;&jcy; &icy;&zcy; &ncy;&icy;&khcy; &scy;&ocy;&zcy;&dcy;&acy;&scy;&tcy; &scy;&scy;&ycy;&lcy;&kcy;&ucy; &ncy;&acy; &ncy;&iecy;&gcy;&ocy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git checkout -b foo  <span class="hljs-comment" title="# or &quot;git switch -c foo&quot;  (1)"># &icy;&lcy;&icy;  &quot;git switch -c foo&quot;  (1)</span>
<span class="hljs-variable">$ </span>git branch foo                                 (<span class="hljs-number">2</span>)
<span class="hljs-variable">$ </span>git tag foo                                    (<span class="hljs-number">3</span>)</pre> </div> </div> <div> <ol> <li> <p><span data-i18n="2b9270da7362bbbcc1c5c58a4667b1e57d19806b1a82cc13b9b79953a0eefa82/b6" data-source="creates a new branch &lt;code&gt;foo&lt;/code&gt;, which refers to commit &lt;code&gt;f&lt;/code&gt;, and then updates &lt;code&gt;HEAD&lt;/code&gt; to refer to branch &lt;code&gt;foo&lt;/code&gt;. In other words, we&amp;rsquo;ll no longer be in detached &lt;code&gt;HEAD&lt;/code&gt; state after this command." onmousemove="i18n(this)">&scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&vcy;&softcy;  <code>foo</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;  <code>f</code> , &acy; &zcy;&acy;&tcy;&iecy;&mcy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&iecy;&tcy;  <code>HEAD</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&ncy;&acy; &scy;&scy;&ycy;&lcy;&acy;&lcy;&acy;&scy;&softcy; &ncy;&acy; &vcy;&iecy;&tcy;&vcy;&softcy;  <code>foo</code> . &Dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ocy;&vcy;&acy;&mcy;&icy;, &pcy;&ocy;&scy;&lcy;&iecy; &ecy;&tcy;&ocy;&jcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &mcy;&ycy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &ncy;&iecy; &bcy;&ucy;&dcy;&iecy;&mcy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&softcy;&scy;&yacy; &vcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy; &ocy;&tcy;&scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy;  <code>HEAD</code> .</span></p> </li> <li> <p><span data-i18n="83a865be61f76af6656448646e3a8975531eb9f79a233a090b7ca8503f6aa88d/2b" data-source="similarly creates a new branch &lt;code&gt;foo&lt;/code&gt;, which refers to commit &lt;code&gt;f&lt;/code&gt;, but leaves &lt;code&gt;HEAD&lt;/code&gt; detached." onmousemove="i18n(this)">&acy;&ncy;&acy;&lcy;&ocy;&gcy;&icy;&chcy;&ncy;&ycy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy; &scy;&ocy;&zcy;&dcy;&acy;&iocy;&tcy;&scy;&yacy; &ncy;&ocy;&vcy;&acy;&yacy; &vcy;&iecy;&tcy;&kcy;&acy;  <code>foo</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  <code>f</code> , &ncy;&ocy; &ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy;  <code>HEAD</code>  &ocy;&tcy;&scy;&ocy;&iecy;&dcy;&icy;&ncy;&iocy;&ncy;&ncy;&ocy;&jcy;.</span></p> </li> <li> <p><span data-i18n="710ce140ab813c2660d0f50c0f856cc08051cbf540a260c47231ceb4e5a061b8/ce" data-source="creates a new tag &lt;code&gt;foo&lt;/code&gt;, which refers to commit &lt;code&gt;f&lt;/code&gt;, leaving &lt;code&gt;HEAD&lt;/code&gt; detached." onmousemove="i18n(this)">&scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy; &ncy;&ocy;&vcy;&ycy;&jcy; &tcy;&iecy;&gcy;  <code>foo</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;  <code>f</code> , &ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&yacy;  <code>HEAD</code>  &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&ncy;&ycy;&mcy;.</span></p> </li> </ol> </div> <p><span data-i18n="3e42aea817017ce5ee52470d6443ad20891d880cbe7abf19f3a6b7b5583e26e1/96" data-source="If we have moved away from commit &lt;code&gt;f&lt;/code&gt;, then we must first recover its object name (typically by using git reflog), and then we can create a reference to it. For example, to see the last two commits to which &lt;code&gt;HEAD&lt;/code&gt; referred, we can use either of these commands:" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &mcy;&ycy; &ocy;&tcy;&ocy;&shcy;&lcy;&icy; &ocy;&tcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;  <code>f</code> , &tcy;&ocy; &scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &mcy;&ycy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &icy;&mcy;&yacy; &iecy;&gcy;&ocy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; (&ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &rcy;&iecy;&fcy;&lcy;&ocy;&gcy;&acy;  git ), &acy; &zcy;&acy;&tcy;&iecy;&mcy; &mcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&mcy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &scy;&scy;&ycy;&lcy;&kcy;&ucy; &ncy;&acy; &ncy;&iecy;&gcy;&ocy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy; &dcy;&vcy;&acy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&icy;&khcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;, &ncy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy;  <code>HEAD</code> , &mcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &lcy;&yucy;&bcy;&ucy;&yucy; &icy;&zcy; &ecy;&tcy;&icy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;:</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git reflog -2 HEAD <span class="hljs-comment"># or</span></span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git <span class="hljs-built_in">log</span> -g -2 HEAD</span></pre> </div> </div> </div> <h2 class="text-body-emphasis"  id="_argument_disambiguation"><span data-i18n="a1de651d84c94aae8d3960a7b19235cf071c111da3c9e7db2f1f24a073d3fcd0/82" data-source="Argument disambiguation" onmousemove="i18n(this)">Argument disambiguation</span></h2> <div> <p><span data-i18n="05ad487392052b7e076df3eea9b818a0563a8c44f3c544d4107079d73cf39f99/2d" data-source="When there is only one argument given and it is not &lt;code&gt;--&lt;/code&gt; (e.g. &lt;code&gt;git
checkout abc&lt;/code&gt;), and when the argument is both a valid &lt;code&gt;&amp;lt;tree-ish&amp;gt;&lt;/code&gt; (e.g. a branch &lt;code&gt;abc&lt;/code&gt; exists) and a valid &lt;code&gt;&amp;lt;pathspec&amp;gt;&lt;/code&gt; (e.g. a file or a directory whose name is &amp;quot;abc&amp;quot; exists), Git would usually ask you to disambiguate. Because checking out a branch is so common an operation, however, &lt;code&gt;git checkout abc&lt;/code&gt; takes &amp;quot;abc&amp;quot; as a &lt;code&gt;&amp;lt;tree-ish&amp;gt;&lt;/code&gt; in such a situation. Use &lt;code&gt;git checkout -- &amp;lt;pathspec&amp;gt;&lt;/code&gt; if you want to checkout these paths out of the index." onmousemove="i18n(this)">&Kcy;&ocy;&gcy;&dcy;&acy; &zcy;&acy;&dcy;&acy;&ncy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&dcy;&icy;&ncy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;, &icy; &ecy;&tcy;&ocy; &ncy;&iecy;  <code>--</code>  (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>git
checkout abc</code> ), &icy; &kcy;&ocy;&gcy;&dcy;&acy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &ocy;&dcy;&ncy;&ocy;&vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy; &dcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&mcy;&ycy;&mcy;  <code>&lt;tree-ish&gt;</code>  (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &vcy;&iecy;&tcy;&vcy;&softcy;  <code>abc</code> ) &icy; &dcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&mcy;&ycy;&mcy;  <code>&lt;pathspec&gt;</code>  (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &fcy;&acy;&jcy;&lcy; &icy;&lcy;&icy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  &quot;abc&quot; ) ,  Git  &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &pcy;&rcy;&ocy;&scy;&icy;&tcy; &vcy;&acy;&scy; &ucy;&scy;&tcy;&rcy;&acy;&ncy;&icy;&tcy;&softcy; &ncy;&iecy;&ocy;&dcy;&ncy;&ocy;&zcy;&ncy;&acy;&chcy;&ncy;&ocy;&scy;&tcy;&softcy;. &Ocy;&dcy;&ncy;&acy;&kcy;&ocy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&acy; &vcy;&iecy;&tcy;&kcy;&icy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &dcy;&ocy;&vcy;&ocy;&lcy;&softcy;&ncy;&ocy; &rcy;&acy;&scy;&pcy;&rcy;&ocy;&scy;&tcy;&rcy;&acy;&ncy;&iecy;&ncy;&ncy;&ocy;&jcy; &ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&iecy;&jcy;,  <code>git checkout abc</code>  &vcy; &tcy;&acy;&kcy;&ocy;&jcy; &scy;&icy;&tcy;&ucy;&acy;&tscy;&icy;&icy; &vcy;&ocy;&scy;&pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&iecy;&tcy;  &quot;abc&quot;  &kcy;&acy;&kcy;  <code>&lt;tree-ish&gt;</code> . &Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>git checkout -- &lt;pathspec&gt;</code> , &iecy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&softcy; &ecy;&tcy;&icy; &pcy;&ucy;&tcy;&icy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_examples"><span data-i18n="e68ee04dff59551b7d1ae07a2f8a00dc61d841628948da3d2781630706a05e92/38" data-source="Examples" onmousemove="i18n(this)">Examples</span></h2> <div> <div> <h3 class="text-body-emphasis"  id="_1_paths"><span data-i18n="fb7b08838a7763e0098dd5b373fafa03b205495e5c6feb18ab141a77eeed4b1b/be" data-source="1. Paths" onmousemove="i18n(this)">1. Paths</span></h3> <p><span data-i18n="b0e589e6ba7f3f13c8e2cfcd5935fbaa139e2f42ee8f2dd5e8eb8372f433cfaf/f0" data-source="The following sequence checks out the &lt;code&gt;master&lt;/code&gt; branch, reverts the &lt;code&gt;Makefile&lt;/code&gt; to two revisions back, deletes &lt;code&gt;hello.c&lt;/code&gt; by mistake, and gets it back from the index." onmousemove="i18n(this)">&Scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&acy;&yacy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&scy;&tcy;&softcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&iecy;&tcy; &vcy;&iecy;&tcy;&vcy;&softcy;  <code>master</code> , &vcy;&ocy;&zcy;&vcy;&rcy;&acy;&shchcy;&acy;&iecy;&tcy;  <code>Makefile</code>  &ncy;&acy; &dcy;&vcy;&iecy; &rcy;&iecy;&vcy;&icy;&zcy;&icy;&icy; &ncy;&acy;&zcy;&acy;&dcy;, &pcy;&ocy; &ocy;&shcy;&icy;&bcy;&kcy;&iecy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy;  <code>hello.c</code>  &icy; &vcy;&ocy;&zcy;&vcy;&rcy;&acy;&shchcy;&acy;&iecy;&tcy; &iecy;&gcy;&ocy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;.</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git checkout master             (1)</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git checkout master~2 Makefile  (2)</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">rm</span> -f hello.c</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git checkout hello.c            (3)</span></pre> </div> </div> <div> <ol> <li> <p><span data-i18n="467325537e4a94d2f1b90ad235694d1e85f3776b893a8c16957d1da52066e685/ab" data-source="switch branch" onmousemove="i18n(this)">switch branch</span></p> </li> <li> <p><span data-i18n="05c954b5582a901492344199005d0cbba80d7cc4db0c3b3b51465d9e94a326a1/0a" data-source="take a file out of another commit" onmousemove="i18n(this)">&vcy;&zcy;&yacy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy; &icy;&zcy; &dcy;&rcy;&ucy;&gcy;&ocy;&gcy;&ocy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;</span></p> </li> <li> <p><span data-i18n="3b528b70a7f624da50080230d03157db962b74ff2731e8513034bae691343a4d/bd" data-source="restore &lt;code&gt;hello.c&lt;/code&gt; from the index" onmousemove="i18n(this)">&vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy;  <code>hello.c</code>  &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;</span></p> </li> </ol> </div> <p><span data-i18n="11d17ddcaf895f0dfb0d506201356615628d6c8a442af212bf4fbb40c1c99b8f/ee" data-source="If you want to check out &lt;code&gt;all&lt;/code&gt; C source files out of the index, you can say" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;  <code>all</code>  C &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git checkout -- <span class="hljs-string">&apos;*.c&apos;</span></pre> </div> </div> <p><span data-i18n="cc885563c656ac06fdbbad2e77b850f5d1e83cc7702ffe309ca4c84da7ed67b8/ee" data-source="Note the quotes around &lt;code&gt;*.c&lt;/code&gt;. The file &lt;code&gt;hello.c&lt;/code&gt; will also be checked out, even though it is no longer in the working tree, because the file globbing is used to match entries in the index (not in the working tree by the shell)." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy; &ncy;&acy; &kcy;&acy;&vcy;&ycy;&chcy;&kcy;&icy; &vcy;&ocy;&kcy;&rcy;&ucy;&gcy;  <code>*.c</code> . &Fcy;&acy;&jcy;&lcy;  <code>hello.c</code>  &tcy;&acy;&kcy;&zhcy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;, &khcy;&ocy;&tcy;&yacy; &iecy;&gcy;&ocy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &ncy;&iecy;&tcy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &pcy;&ocy;&dcy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&kcy;&acy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &dcy;&lcy;&yacy; &scy;&ocy;&pcy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &zcy;&acy;&pcy;&icy;&scy;&iecy;&jcy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy; (&acy; &ncy;&iecy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&icy;).</span></p> <p><span data-i18n="7d032819c9f294349b045569d8085988c7c3ea16d11715f298be633961bce931/5a" data-source="If you have an unfortunate branch that is named &lt;code&gt;hello.c&lt;/code&gt;, this step would be confused as an instruction to switch to that branch. You should instead write:" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &ncy;&iecy;&ucy;&dcy;&acy;&chcy;&ncy;&acy;&yacy; &vcy;&iecy;&tcy;&kcy;&acy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>hello.c</code> , &ecy;&tcy;&ocy;&tcy; &shcy;&acy;&gcy; &bcy;&ucy;&dcy;&iecy;&tcy; &vcy;&ocy;&scy;&pcy;&rcy;&icy;&ncy;&yacy;&tcy; &kcy;&acy;&kcy; &icy;&ncy;&scy;&tcy;&rcy;&ucy;&kcy;&tscy;&icy;&yacy; &pcy;&ocy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&yucy; &ncy;&acy; &ecy;&tcy;&ucy; &vcy;&iecy;&tcy;&kcy;&ucy;. &Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &vcy;&acy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &ncy;&acy;&pcy;&icy;&scy;&acy;&tcy;&softcy;:</span></p> <div> <div> <pre class="hljs language-lua">$ git checkout <span class="hljs-comment">-- hello.c</span></pre> </div> </div> </div> <div> <h3 class="text-body-emphasis"  id="_2_merge"><span data-i18n="37bfafdcf685e3d0e76de6fd32f39ec9409f58e6ab6abd03671a9e94bcb127d1/93" data-source="2. Merge" onmousemove="i18n(this)">2. Merge</span></h3> <p><span data-i18n="7692418c1e7a09436b295552636f7ff97c1f23622e85f48338ec48a2778482b5/fe" data-source="After working in the wrong branch, switching to the correct branch would be done using:" onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy; &ncy;&iecy; &vcy; &tcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&iecy; &ncy;&acy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&softcy;&ncy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy; &bcy;&ucy;&dcy;&iecy;&tcy; &ocy;&scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&lcy;&yacy;&tcy;&softcy;&scy;&yacy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git checkout mytopic</pre> </div> </div> <p><span data-i18n="c1bfd88c028ddae489e064cfbdbeb811aedfdecfae493dde13450c3272469dd1/f1" data-source="However, your &amp;quot;wrong&amp;quot; branch and correct &lt;code&gt;mytopic&lt;/code&gt; branch may differ in files that you have modified locally, in which case the above checkout would fail like this:" onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &vcy;&acy;&shcy;&acy; &vcy;&iecy;&tcy;&kcy;&acy;  &quot;wrong&quot;  &icy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&softcy;&ncy;&acy;&yacy; &vcy;&iecy;&tcy;&kcy;&acy;  <code>mytopic</code>  &mcy;&ocy;&gcy;&ucy;&tcy; &ocy;&tcy;&lcy;&icy;&chcy;&acy;&tcy;&softcy;&scy;&yacy; &vcy; &fcy;&acy;&jcy;&lcy;&acy;&khcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&ycy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&icy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ocy;, &icy; &vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&ncy;&ncy;&acy;&yacy; &vcy;&ycy;&shcy;&iecy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&acy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&icy;&tcy;&scy;&yacy; &ncy;&iecy;&ucy;&dcy;&acy;&chcy;&iecy;&jcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;:</span></p> <div> <div> <pre class="hljs language-lua">$ git checkout mytopic
<span class="hljs-built_in">error</span>: You have <span class="hljs-keyword">local</span> changes to <span class="hljs-string">&apos;frotz&apos;</span>; <span class="hljs-keyword">not</span> switching branches.</pre> </div> </div> <p><span data-i18n="1838b444d473f7a36180c88e3f1e75202d5965a3872fc38fd451fad9d10797b9/f0" data-source="You can give the &lt;code&gt;-m&lt;/code&gt; flag to the command, which would try a three-way merge:" onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &fcy;&lcy;&acy;&gcy;  <code>-m</code>  &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&iecy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &pcy;&ocy;&pcy;&ycy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git checkout -m mytopic
<span class="hljs-title class_">Auto</span>-merging frotz</pre> </div> </div> <p><span data-i18n="04b4402c8246c058b4cdd0dc28ca8c7c6b5037082d482105acc2431ce822a537/d3" data-source="After this three-way merge, the local modifications are &lt;code&gt;not&lt;/code&gt; registered in your index file, so &lt;code&gt;git diff&lt;/code&gt; would show you what changes you made since the tip of the new branch." onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &ecy;&tcy;&ocy;&gcy;&ocy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;  <code>not</code>  &rcy;&iecy;&gcy;&icy;&scy;&tcy;&rcy;&icy;&rcy;&ucy;&yucy;&tcy;&scy;&yacy; &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy;  <code>git diff</code>  &pcy;&ocy;&kcy;&acy;&zhcy;&iecy;&tcy; &vcy;&acy;&mcy;, &kcy;&acy;&kcy;&icy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy;&ycy; &vcy;&ncy;&iecy;&scy;&lcy;&icy; &scy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy;&acy; &ncy;&acy;&chcy;&acy;&lcy;&acy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;.</span></p> </div> <div> <h3 class="text-body-emphasis"  id="_3_merge_conflict"><span data-i18n="8141eb9c3482b10f5183845247ea49316daa2b655d5dd1256e7521eafb0951b6/99" data-source="3. Merge conflict" onmousemove="i18n(this)">3. &Ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&acy;</span></h3> <p><span data-i18n="040bcdcc288308c756b91eced950b60e7e81e0f926cb0908c13ae8e9e99fc4a3/c2" data-source="When a merge conflict happens during switching branches with the &lt;code&gt;-m&lt;/code&gt; option, you would see something like this:" onmousemove="i18n(this)">&Kcy;&ocy;&gcy;&dcy;&acy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &pcy;&rcy;&ocy;&icy;&scy;&khcy;&ocy;&dcy;&icy;&tcy; &vcy;&ocy; &vcy;&rcy;&iecy;&mcy;&yacy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&yacy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy; &scy; &ocy;&pcy;&tscy;&icy;&iecy;&jcy;  <code>-m</code> , &vcy;&ycy; &ucy;&vcy;&icy;&dcy;&icy;&tcy;&iecy; &chcy;&tcy;&ocy;-&tcy;&ocy; &vcy;&rcy;&ocy;&dcy;&iecy; &ecy;&tcy;&ocy;&gcy;&ocy;:</span></p> <div> <div> <pre class="hljs language-makefile">$ git checkout -m mytopic
Auto-merging frotz
<span class="hljs-section">ERROR: Merge conflict in frotz</span>
<span class="hljs-section">fatal: merge program failed</span></pre> </div> </div> <p><span data-i18n="c8fca1d3dce733f2856c12723bb8c0620e886d082df58eca2ad6ca2a226e4ebe/38" data-source="At this point, &lt;code&gt;git diff&lt;/code&gt; shows the changes cleanly merged as in the previous example, as well as the changes in the conflicted files. Edit and resolve the conflict and mark it resolved with &lt;code&gt;git add&lt;/code&gt; as usual:" onmousemove="i18n(this)">&Ncy;&acy; &ecy;&tcy;&ocy;&mcy; &ecy;&tcy;&acy;&pcy;&iecy;  <code>git diff</code>  &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &chcy;&icy;&scy;&tcy;&ocy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;, &kcy;&acy;&kcy; &vcy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&iecy;&mcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&iecy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ucy;&yucy;&shchcy;&icy;&khcy; &fcy;&acy;&jcy;&lcy;&acy;&khcy;. &Ocy;&tcy;&rcy;&iecy;&dcy;&acy;&kcy;&tcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &icy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&icy;&tcy;&iecy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy; &icy; &ocy;&tcy;&mcy;&iecy;&tcy;&softcy;&tcy;&iecy; &iecy;&gcy;&ocy; &kcy;&acy;&kcy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&iecy;&ncy;&ncy;&ycy;&jcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git add</code> , &kcy;&acy;&kcy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>edit frotz
<span class="hljs-variable">$ </span>git add frotz</pre> </div> </div> </div> </div> <h2 class="text-body-emphasis"  id="_configuration"><span data-i18n="b332c3492d5eb10a118eb6d8b0dcd689bc2477ce2ae16b303753b942b54377bc/aa" data-source="Configuration" onmousemove="i18n(this)">Configuration</span></h2> <div> <p><span data-i18n="5b8d919fa35b75aa925ebd5414ed6373e762fb0a087a062961c27b2ce9586555/57" data-source="Everything below this line in this section is selectively included from the &lt;a href=&quot;git-config&quot;&gt;git-config[1]&lt;/a&gt; documentation. The content is the same as what&amp;rsquo;s found there:" onmousemove="i18n(this)">&Vcy;&scy;&iecy;, &chcy;&tcy;&ocy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &ncy;&icy;&zhcy;&iecy; &ecy;&tcy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy; &vcy; &ecy;&tcy;&ocy;&mcy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;, &vcy;&ycy;&bcy;&ocy;&rcy;&ocy;&chcy;&ncy;&ocy; &vcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&ocy; &icy;&zcy; &dcy;&ocy;&kcy;&ucy;&mcy;&iecy;&ncy;&tcy;&acy;&tscy;&icy;&icy;  <a href="git-config.html">git-config[1]</a> . &Scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&ncy;&icy;&iecy; &tcy;&acy;&kcy;&ocy;&iecy; &zhcy;&iecy;, &kcy;&acy;&kcy; &icy; &ncy;&acy;&jcy;&dcy;&iecy;&ncy;&ncy;&ocy;&iecy; &tcy;&acy;&mcy;:</span></p> <div> <dl> <dt id="Documentation/git-checkout.txt-checkoutdefaultRemote"><span data-i18n="5992cc6699487e18a2fcdd728103135ba4970dc05826a1ec6a9545d2864a0a74/ba" data-source="checkout.defaultRemote" onmousemove="i18n(this)">checkout.defaultRemote</span></dt> <dd> <p><span data-i18n="ed4fa03018ab7f8cae73e7b5be22586b531a0b7a377dd352c69aa53818eb1185/26" data-source="When you run &lt;code&gt;git checkout &amp;lt;something&amp;gt;&lt;/code&gt; or &lt;code&gt;git switch &amp;lt;something&amp;gt;&lt;/code&gt; and only have one remote, it may implicitly fall back on checking out and tracking e.g. &lt;code&gt;origin/&amp;lt;something&amp;gt;&lt;/code&gt;. This stops working as soon as you have more than one remote with a &lt;code&gt;&amp;lt;something&amp;gt;&lt;/code&gt; reference. This setting allows for setting the name of a preferred remote that should always win when it comes to disambiguation. The typical use-case is to set this to &lt;code&gt;origin&lt;/code&gt;." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&iecy;  <code>git checkout &lt;something&gt;</code>  &icy;&lcy;&icy;  <code>git switch &lt;something&gt;</code>  &icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&dcy;&icy;&ncy; &pcy;&ucy;&lcy;&softcy;&tcy; &dcy;&icy;&scy;&tcy;&acy;&ncy;&tscy;&icy;&ocy;&ncy;&ncy;&ocy;&gcy;&ocy; &ucy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy;, &ocy;&ncy; &mcy;&ocy;&zhcy;&iecy;&tcy; &ncy;&iecy;&yacy;&vcy;&ncy;&ocy; &vcy;&iecy;&rcy;&ncy;&ucy;&tcy;&softcy;&scy;&yacy; &kcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&iecy; &icy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yucy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;  <code>origin/&lt;something&gt;</code> . &Ecy;&tcy;&ocy; &pcy;&iecy;&rcy;&iecy;&scy;&tcy;&acy;&ncy;&iecy;&tcy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&tcy;&softcy;, &kcy;&acy;&kcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ucy; &vcy;&acy;&scy; &bcy;&ucy;&dcy;&iecy;&tcy; &bcy;&ocy;&lcy;&iecy;&iecy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &pcy;&ucy;&lcy;&softcy;&tcy;&acy; &scy; &kcy;&ocy;&dcy;&ocy;&mcy;  <code>&lt;something&gt;</code> . &Ecy;&tcy;&ocy;&tcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &icy;&mcy;&yacy; &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&chcy;&tcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &pcy;&ucy;&lcy;&softcy;&tcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &vcy;&ycy;&icy;&gcy;&rcy;&ycy;&vcy;&acy;&tcy;&softcy;, &kcy;&ocy;&gcy;&dcy;&acy; &dcy;&iecy;&lcy;&ocy; &dcy;&ocy;&khcy;&ocy;&dcy;&icy;&tcy; &dcy;&ocy; &ucy;&scy;&tcy;&rcy;&acy;&ncy;&iecy;&ncy;&icy;&yacy; &ncy;&iecy;&ocy;&dcy;&ncy;&ocy;&zcy;&ncy;&acy;&chcy;&ncy;&ocy;&scy;&tcy;&icy;. &Tcy;&icy;&pcy;&icy;&chcy;&ncy;&ycy;&jcy; &vcy;&acy;&rcy;&icy;&acy;&ncy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy; &mdash; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &dcy;&lcy;&yacy; &ecy;&tcy;&ocy;&gcy;&ocy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&acy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy;  <code>origin</code>  .</span></p> <p><span data-i18n="e87282beaec5ad974a0306def791f4d20fd0635f1c1d7cb900902659e7cd5f28/ca" data-source="Currently this is used by &lt;a href=&quot;git-switch&quot;&gt;git-switch[1]&lt;/a&gt; and &lt;a href=&quot;git-checkout&quot;&gt;git-checkout[1]&lt;/a&gt; when &lt;code&gt;git checkout &amp;lt;something&amp;gt;&lt;/code&gt; or &lt;code&gt;git switch &amp;lt;something&amp;gt;&lt;/code&gt; will checkout the &lt;code&gt;&amp;lt;something&amp;gt;&lt;/code&gt; branch on another remote, and by &lt;a href=&quot;git-worktree&quot;&gt;git-worktree[1]&lt;/a&gt; when &lt;code&gt;git worktree add&lt;/code&gt; refers to a remote branch. This setting might be used for other checkout-like commands or functionality in the future." onmousemove="i18n(this)">&Vcy; &ncy;&acy;&scy;&tcy;&ocy;&yacy;&shchcy;&iecy;&iecy; &vcy;&rcy;&iecy;&mcy;&yacy; &ecy;&tcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <a href="git-switch.html">git-switch[1]</a>  &icy;  <a href="git-checkout.html">git-checkout[1]</a> , &kcy;&ocy;&gcy;&dcy;&acy;  <code>git checkout &lt;something&gt;</code>  &icy;&lcy;&icy;  <code>git switch &lt;something&gt;</code>  &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&iecy;&tcy; &vcy;&iecy;&tcy;&kcy;&ucy;  <code>&lt;something&gt;</code>  &ncy;&acy; &dcy;&rcy;&ucy;&gcy;&ocy;&mcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &ucy;&scy;&tcy;&rcy;&ocy;&jcy;&scy;&tcy;&vcy;&iecy;, &icy;  <a href="git-worktree.html">git-worktree[1]</a> , &kcy;&ocy;&gcy;&dcy;&acy;  <code>git worktree add</code>  &scy;&scy;&ycy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;. &Ecy;&tcy;&ocy;&tcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &dcy;&lcy;&yacy; &dcy;&rcy;&ucy;&gcy;&icy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy; &icy;&lcy;&icy; &fcy;&ucy;&ncy;&kcy;&tscy;&icy;&jcy;, &pcy;&ocy;&dcy;&ocy;&bcy;&ncy;&ycy;&khcy; &ocy;&fcy;&ocy;&rcy;&mcy;&lcy;&iecy;&ncy;&icy;&yucy; &zcy;&acy;&kcy;&acy;&zcy;&acy;, &vcy; &bcy;&ucy;&dcy;&ucy;&shchcy;&iecy;&mcy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt-checkoutguess"><span data-i18n="a4aa199dd171e56bb1b575d2cc7f0ba9ca6cb3701534f3b8a4ba20de961d785a/fd" data-source="checkout.guess" onmousemove="i18n(this)">checkout.guess</span></dt> <dd> <p><span data-i18n="9b3881130917c07151ecd316a0ffb5fcaf5229d7c7176e2aa2c60b4ae1053f60/b6" data-source="Provides the default value for the &lt;code&gt;--guess&lt;/code&gt; or &lt;code&gt;--no-guess&lt;/code&gt; option in &lt;code&gt;git checkout&lt;/code&gt; and &lt;code&gt;git switch&lt;/code&gt;. See &lt;a href=&quot;git-switch&quot;&gt;git-switch[1]&lt;/a&gt; and &lt;a href=&quot;git-checkout&quot;&gt;git-checkout[1]&lt;/a&gt;." onmousemove="i18n(this)">&Pcy;&rcy;&iecy;&dcy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &dcy;&lcy;&yacy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&acy;  <code>--guess</code>  &icy;&lcy;&icy;  <code>--no-guess</code>  &vcy;  <code>git checkout</code>  &icy;  <code>git switch</code> . &Scy;&mcy;.  <a href="git-switch.html">git-switch[1]</a>  &icy;  <a href="git-checkout.html">git-checkout[1]</a> .</span></p> </dd> <dt id="Documentation/git-checkout.txt-checkoutworkers"><span data-i18n="3488f8a81379c36869b8c5308cf69c811d4205b010ef5913c5fa28020d9ee32f/46" data-source="checkout.workers" onmousemove="i18n(this)">checkout.workers</span></dt> <dd> <p><span data-i18n="b74c9e784164502ef65007f6a095f380db65287fd688985fdf8c6440fc04633d/f9" data-source="The number of parallel workers to use when updating the working tree. The default is one, i.e. sequential execution. If set to a value less than one, Git will use as many workers as the number of logical cores available. This setting and &lt;code&gt;checkout.thresholdForParallelism&lt;/code&gt; affect all commands that perform checkout. E.g. checkout, clone, reset, sparse-checkout, etc." onmousemove="i18n(this)">&Kcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&tcy;&vcy;&ocy; &pcy;&acy;&rcy;&acy;&lcy;&lcy;&iecy;&lcy;&softcy;&ncy;&ycy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&ocy;&vcy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&ycy;&khcy; &pcy;&rcy;&icy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&icy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ocy; &ocy;&dcy;&ncy;&ocy;, &tcy;.&iecy;. &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&iecy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&iecy;. &IEcy;&scy;&lcy;&icy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ocy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; &mcy;&iecy;&ncy;&softcy;&shcy;&iecy; &iecy;&dcy;&icy;&ncy;&icy;&tscy;&ycy;,  Git  &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &scy;&tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&ocy;&vcy;, &scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ocy; &lcy;&ocy;&gcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;&khcy; &yacy;&dcy;&iecy;&rcy;. &Ecy;&tcy;&ocy;&tcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy; &icy;  <code>checkout.thresholdForParallelism</code>  &vcy;&lcy;&icy;&yacy;&yucy;&tcy; &ncy;&acy; &vcy;&scy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;, &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&yucy;&shchcy;&icy;&iecy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&ucy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&acy;, &kcy;&lcy;&ocy;&ncy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;, &scy;&bcy;&rcy;&ocy;&scy;, &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&acy;&yacy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&acy; &icy; &tcy;. &dcy;.</span></p> <p><span data-i18n="26c4e35fc4849fee057090948de6165138662d0ca05671771aa401e73504b9ff/06" data-source="Note: Parallel checkout usually delivers better performance for repositories located on SSDs or over NFS. For repositories on spinning disks and/or machines with a small number of cores, the default sequential checkout often performs better. The size and compression level of a repository might also influence how well the parallel version performs." onmousemove="i18n(this)">&Pcy;&rcy;&icy;&mcy;&iecy;&chcy;&acy;&ncy;&icy;&iecy;. &Pcy;&acy;&rcy;&acy;&lcy;&lcy;&iecy;&lcy;&softcy;&ncy;&acy;&yacy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&acy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ocy;&bcy;&iecy;&scy;&pcy;&iecy;&chcy;&icy;&vcy;&acy;&iecy;&tcy; &bcy;&ocy;&lcy;&iecy;&iecy; &vcy;&ycy;&scy;&ocy;&kcy;&ucy;&yucy; &pcy;&rcy;&ocy;&icy;&zcy;&vcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&scy;&tcy;&softcy; &dcy;&lcy;&yacy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy;, &rcy;&acy;&scy;&pcy;&ocy;&lcy;&ocy;&zhcy;&iecy;&ncy;&ncy;&ycy;&khcy; &ncy;&acy; &tcy;&vcy;&iecy;&rcy;&dcy;&ocy;&tcy;&iecy;&lcy;&softcy;&ncy;&ycy;&khcy; &ncy;&acy;&kcy;&ocy;&pcy;&icy;&tcy;&iecy;&lcy;&yacy;&khcy; &icy;&lcy;&icy; &chcy;&iecy;&rcy;&iecy;&zcy; NFS. &Dcy;&lcy;&yacy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy; &ncy;&acy; &vcy;&rcy;&acy;&shchcy;&acy;&yucy;&shchcy;&icy;&khcy;&scy;&yacy; &dcy;&icy;&scy;&kcy;&acy;&khcy; &icy;/&icy;&lcy;&icy; &mcy;&acy;&shcy;&icy;&ncy;&acy;&khcy; &scy; &ncy;&iecy;&bcy;&ocy;&lcy;&softcy;&shcy;&icy;&mcy; &kcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&tcy;&vcy;&ocy;&mcy; &yacy;&dcy;&iecy;&rcy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&acy;&yacy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&acy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &chcy;&acy;&scy;&tcy;&ocy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy; &lcy;&ucy;&chcy;&shcy;&iecy;. &Rcy;&acy;&zcy;&mcy;&iecy;&rcy; &icy; &ucy;&rcy;&ocy;&vcy;&iecy;&ncy;&softcy; &scy;&zhcy;&acy;&tcy;&icy;&yacy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&gcy;&ucy;&tcy; &vcy;&lcy;&icy;&yacy;&tcy;&softcy; &ncy;&acy; &pcy;&rcy;&ocy;&icy;&zcy;&vcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&scy;&tcy;&softcy; &pcy;&acy;&rcy;&acy;&lcy;&lcy;&iecy;&lcy;&softcy;&ncy;&ocy;&jcy; &vcy;&iecy;&rcy;&scy;&icy;&icy;.</span></p> </dd> <dt id="Documentation/git-checkout.txt-checkoutthresholdForParallelism"><span data-i18n="9c0bf4e96161a32a90a1c1bfa004e4c181c7e23b494457115a88220354f5457b/4c" data-source="checkout.thresholdForParallelism" onmousemove="i18n(this)">checkout.thresholdForParallelism</span></dt> <dd> <p><span data-i18n="db4c406e946610cff5f79fe9f4e14c94067ceb7899b9ae79d095877a96a04d21/cd" data-source="When running parallel checkout with a small number of files, the cost of subprocess spawning and inter-process communication might outweigh the parallelization gains. This setting allows you to define the minimum number of files for which parallel checkout should be attempted. The default is 100." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &pcy;&acy;&rcy;&acy;&lcy;&lcy;&iecy;&lcy;&softcy;&ncy;&ocy;&mcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&icy; &ncy;&iecy;&bcy;&ocy;&lcy;&softcy;&shcy;&ocy;&gcy;&ocy; &kcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&tcy;&vcy;&acy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &zcy;&acy;&tcy;&rcy;&acy;&tcy;&ycy; &ncy;&acy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&iecy; &pcy;&ocy;&dcy;&pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&ocy;&vcy; &icy; &mcy;&iecy;&zhcy;&pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&ncy;&ocy;&iecy; &vcy;&zcy;&acy;&icy;&mcy;&ocy;&dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&iecy; &mcy;&ocy;&gcy;&ucy;&tcy; &pcy;&iecy;&rcy;&iecy;&vcy;&iecy;&scy;&icy;&tcy;&softcy; &vcy;&ycy;&gcy;&ocy;&dcy;&ycy; &ocy;&tcy; &rcy;&acy;&scy;&pcy;&acy;&rcy;&acy;&lcy;&lcy;&iecy;&lcy;&icy;&vcy;&acy;&ncy;&icy;&yacy;. &Ecy;&tcy;&ocy;&tcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &mcy;&icy;&ncy;&icy;&mcy;&acy;&lcy;&softcy;&ncy;&ocy;&iecy; &kcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&tcy;&vcy;&ocy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &dcy;&lcy;&yacy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&khcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &pcy;&ocy;&pcy;&ycy;&tcy;&acy;&tcy;&softcy;&scy;&yacy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &pcy;&acy;&rcy;&acy;&lcy;&lcy;&iecy;&lcy;&softcy;&ncy;&ocy;&iecy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&iecy;. &Pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &mdash; 100.</span></p> </dd> </dl> </div> </div> <h2 class="text-body-emphasis"  id="_see_also"><span data-i18n="2fa97693b70fa87b95b2d1bdf9558e4ac65d5e82d145f13a03849c4d9c4957a9/40" data-source="See also" onmousemove="i18n(this)">See also</span></h2> <div> <p><span data-i18n="23f79b6e0171316fc65f5d258e439af2b2948c2d971077794b4a412e5f2ede9d/69" data-source="&lt;a href=&quot;git-switch&quot;&gt;git-switch[1]&lt;/a&gt;, &lt;a href=&quot;git-restore&quot;&gt;git-restore[1]&lt;/a&gt;" onmousemove="i18n(this)"><a href="git-switch.html">git-switch[1]</a>, <a href="git-restore.html">git-restore[1]</a></span></p> </div><address>
<p>
    &copy; 2012&ndash;2024 Scott Chacon and others<br/>Licensed under the MIT License.<br/>
<a href="https://git-scm.com/docs/git-checkout">https://git-scm.com/docs/git-checkout</a>
</p>
</address>                </article>
            </main>

            <br>
            <br>
            <hr>

                            <ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-6424571640879890"
     data-ad-slot="3954319254"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>            
        </div>

        <!-- -->

        <div class="col-md-3">
            <br>
            <form action="-index-.html">
                <div class="input-group">
                    <input class="form-control" type="search" name="q" placeholder="Search for Git" required>
                    <button class="btn btn-primary" type="submit">
                        <i class="bi bi-search"></i>
                    </button>
                </div>
            </form>
            <br>

                            <div class="list-group list-group-flush">
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-checkout-index.html">
                            git checkout-index                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-cherry.html">
                            git cherry                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-cherry-pick.html">
                            git cherry-pick                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-citool.html">
                            git citool                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-clean.html">
                            git clean                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-clone.html">
                            git clone                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-column.html">
                            git column                        </a>
                                    </div>
            
            <br>
            <div class="my-3">
                   <ins class="adsbygoogle"
        style="display:block"
        data-ad-format="autorelaxed"
        data-ad-client="ca-pub-6424571640879890"
        data-ad-slot="7867651344"></ins>
   <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
   </script>            </div>
            <br>

            
            
        </div>
    </div>
</div>    <!--/sse-->

    <footer>
        <br>
        <div class="container">
            <div class="row">
                <div class="col">
                    <hr>
                    <div class="row">
                        <div class="col-md-10">
                            <ul class="nav">
                                <li class="nav-item">
                                    <a class="nav-link ps-0" href="https://runebook.dev/">Help us Improve Translation</a>
                                </li>
                                                            </ul>
                        </div>
                        <div class="col-md-2 text-end">
                            <a href="git-checkout.html#" class="fs-5" aria-label="Top">
                                <i class="bi bi-arrow-up-square-fill"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <br>
    </footer>
    <script src="../../../runebook.js"></script>
</body>

</html>